Skip to content

Conversation

@backportbot-nextcloud
Copy link

backport of #29322

Signed-off-by: Robin Appelman <robin@icewind.nl>
mysql really likes to pick an index for sorting if it can't fully satisfy the where
filter with an index, since search queries pretty much never are fully filtered by index
mysql often picks an index for sorting instead of the *much* more useful index for filtering.

To bypass this, we tell mysql explicitly not to use the mtime (the default order field) index,
so it will instead pick an index that is actually useful.

Signed-off-by: Robin Appelman <robin@icewind.nl>
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for #29300

@skjnldsv skjnldsv changed the title [stable21] [21] tell mysql to ignore the sort index for search queries [stable21] tell mysql to ignore the sort index for search queries Nov 4, 2021
@skjnldsv skjnldsv added 3. to review Waiting for reviews bug labels Nov 4, 2021
@blizzz
Copy link
Member

blizzz commented Nov 10, 2021

moved to 21.0.7

This was referenced Jan 7, 2022
This was referenced Jan 20, 2022
@blizzz
Copy link
Member

blizzz commented Feb 11, 2022

still waiting

@blizzz
Copy link
Member

blizzz commented Mar 21, 2022

closing. if it should get important again, please reopen.

@blizzz blizzz closed this Mar 21, 2022
@skjnldsv skjnldsv deleted the backport/29322/stable21 branch March 14, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants