Skip to content

[stable21] tell mysql to ignore the sort index for search queries - #29552

Closed
backportbot-nextcloud[bot] wants to merge 2 commits into
stable21from
backport/29322/stable21
Closed

[stable21] tell mysql to ignore the sort index for search queries#29552
backportbot-nextcloud[bot] wants to merge 2 commits into
stable21from
backport/29322/stable21

Conversation

@backportbot-nextcloud

Copy link
Copy Markdown

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>

@skjnldsvskjnldsv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Waiting for #29300

@skjnldsvskjnldsv 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 queriesNov 4, 2021
@skjnldsvskjnldsv added 3. to review Waiting for reviews bug labels Nov 4, 2021
@blizzz

Copy link
Copy Markdown
Member

moved to 21.0.7

This was referenced Jan 7, 2022
This was referenced Jan 20, 2022
@blizzz

Copy link
Copy Markdown
Member

still waiting

@blizzz

Copy link
Copy Markdown
Member

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

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

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@blizzz@miaulalala@skjnldsv@icewind1991