polls icon indicating copy to clipboard operation
polls copied to clipboard

Optimize polls loading

Open dartcafe opened this issue 1 year ago • 2 comments

MigrateSubQueries to joins to avoid heavy subqueries Hopefully fixes #3688

Migrate

  • PollMapper::subQueryVotesCount
  • PollMapper::subQueryOrphanedVotesCount

dartcafe avatar Sep 04 '24 18:09 dartcafe

Nice, should help with performance 👍

I hope so. But I did not have the chance to test, if the outcome is the same as with the subquery.

But it is just at half way, since I plan to replace the other subquery, too. But it's a pain, since the complexity gets risen by every join; and more error-prone

Ideally should be tested with OCI, not sure if you’re willing to add https://github.com/nextcloud/.github/blob/master/workflow-templates/phpunit-oci.yml to the workflows?

Ah nice. I never thought about testing against OCI, although I have in mind, that this is a real use case.

Is can be slow, but oracle database differs on some things so for stuff like a manually written function like that it helps to test on it.

Yes definitely worth it. I would say, we should add it to the databases.

dartcafe avatar Sep 10 '24 19:09 dartcafe

If only someone could take care of the the test suite. 😁

dartcafe avatar Sep 10 '24 19:09 dartcafe

done in #4134

dartcafe avatar Jul 04 '25 06:07 dartcafe