To get more out of your indexes, consider techniques like
covering indexes, which pack all the columns a query needs into the index (
CREATE INDEX idx_cover ON example_table(column1, column2)) so MySQL can skip fetching data from the table.
MySQL does not support a WHERE clause in CREATE INDEX to build an index over only matching rows. Choose indexes for the queries and data you actually have, check the execution plan, and weigh their write and storage costs.
And finally, combining multiple columns into a single index (
CREATE INDEX idx_multi ON example_table(column1, column2)), letting queries that filter on several fields run faster by narrowing results in one go instead of multiple passes.
Learn more about how to set this up in our guide to
creating a MySQL composite index.