It finds all the indexes in the database "my_database" that have a cardinality/count ratio of less than 0.1%
Such indexes are probably not very useful, and should be looked at carefully to justify their existence.
select tables.table_name, statistics.index_name, statistics.cardinality, tables.table_rows
on (statistics.table_name = tables.table_name
and statistics.table_schema = 'my_database'
and ((tables.table_rows / statistics.cardinality) > 1000));
I worked this out on my current MySQL PS gig. The client has indexes on nearly every column of nearly every table. For example, all of their customers are in Texas, but they still put an index on the "state" column in the address table.