Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21] tell mysql to ignore the sort index for search queries #29322

Merged
merged 2 commits into from
Nov 4, 2021

Commits on Oct 18, 2021

  1. allow specifying index hints for mysql search queries

    Signed-off-by: Robin Appelman <robin@icewind.nl>
    icewind1991 committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    7f272dd View commit details
    Browse the repository at this point in the history
  2. tell mysql to ignore the sort index for search queries

    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>
    icewind1991 committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    5002bf9 View commit details
    Browse the repository at this point in the history