Database Indexes Aren't Just About Which Columns You Index. They're Also About the Order
But here's something many developers overlook:
INDEX(name, age) is NOT the same as INDEX(age, name)
They contain the same columns.
Yet one might make your query run in milliseconds, while the other
blogs.ashikunnabi.com5 min read