MySQL: Identify The Worst Performing Indexes

This script shows the Top 10 worst performing indexes (in terms of selectivity %) on the whole MySQL server instance. Selectivity is the percentage of distinct values in an indexed field compared to the number of records in the table. When constructing indexes, you want to create indexes on columns that have a good chance of “high selectivity”. This requires some understanding of the data in the column, which you may or may not have depending on your knowledge of the domain and the availability of sample data....

April 16, 2010