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
Optimize the MySQL indexes #6605
Conversation
ORDER BY
queries
If this sorting is only for the back end, this might be overkill. Indexes make lookup fast, but they also make updates/deletes/reorganisation slow. Might need some performance testing to be sure... 🙂 |
I’m not sure if this is actually an improvement for us as most of our queries do a I’d only add those indexes for cases where we can measure an actual performance improvement. |
I was not able to reproduce these results on my machine (MySQL 8.0.33). Also, your example queries do not look like real queries that are used by Contao. We never use the |
Yes we do:
|
In this case
This query cannot make use of an index on |
d237b81
to
025ec49
Compare
025ec49
to
09721f0
Compare
ORDER BY
queries
I have reduced the number of new indexes to 2 in 09721f0. Please review again. |
It is apparently recommended to use indexed columns in theORDER BY
clause to speed up sorting.Edit: The PR now only adds two
pid
indexes and optimized atl_search
index.