Additional index on oc_preferences to make queries without a user filter faster#31047
Merged
juliusknorr merged 1 commit intomasterfrom Apr 21, 2022
Merged
Additional index on oc_preferences to make queries without a user filter faster#31047juliusknorr merged 1 commit intomasterfrom
juliusknorr merged 1 commit intomasterfrom
Conversation
nickvergessen
approved these changes
Feb 7, 2022
Member
|
seems the index has introduced ordering issues: |
Member
|
Postgres needs a sleep after each insert. Otherwise the input order is not the same as it's journaled at the meantime. Also:
|
Merged
Merged
Member
|
@juliushaertl can you finish this at some point, it looks interesting :-) |
…without a user filter is fast Signed-off-by: Julius Härtl <jus@bitgrid.net>
476a41b to
7fbd93b
Compare
Member
Author
|
Rebased and added an |
Member
Author
|
Another quick re-review on the order by statement would be appreciated before hitting merge ;) @nickvergessen @PVince81 |
nickvergessen
approved these changes
Apr 21, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #30421
IConfig methods may issue queries which are causing a full table scan on oc_preferences with using the existing primary key as an index as it is only partially filtered for in the where clause, as the order seems to be relevant
(userid,appid,configkey)server/lib/private/AllConfig.php
Lines 485 to 490 in c92ac34
server/lib/private/AllConfig.php
Lines 387 to 392 in c92ac34