I was conflicted when I read "3. Most selective columns to the left":<p><a href="http://www.unofficialmysqlguide.com/composite-indexes.html#determining-the-order-for-composite-indexes" rel="nofollow">http://www.unofficialmysqlguide.com/composite-indexes.html#d...</a><p>Because I had previously read that it was a myth:<p><a href="https://use-the-index-luke.com/sql/myth-directory/most-selective-first" rel="nofollow">https://use-the-index-luke.com/sql/myth-directory/most-selec...</a><p>Both this guide and Use The Index Luke seem to be good resources. Later I realized that maybe the guide had listed this optimization tips in order of importance. After all "1. Leftmost rule" and "2. Ranges to the right" are the ones that affect the most the usability of the index. Then the seemingly opposite viewpoints converge.
Author here. Thanks for linking to my guide :)<p>I'll be expanding it in the coming months as the new features in MySQL 8.0 are released. On my TODO is descending indexes, improvements to OPTIMIZER TRACE, Window functions, CTEs and expanding the info on character sets.<p>Suggestions/comments welcome!
Does anyone have a good comparison between MariaDB 10.x and MySQL 8.0? Also, when will MySQL 8.0 be out? (The current version is "Not yet released, Development Milestone").