Slow query? Add an index or two! But things are suddenly even slower! Indexes are great tools to speed data lookup but have overhead issues. Histograms don’t have that overhead but may not be suited. And how you lock rows also effects performance. So what do you do to speed up queries smartly?
Slides available at https://www.slideshare.net/davestokes/php-uk-2020-tutorial-mysql-indexes-histograms-and-other-ways-to-speed-up-your-queries