Created
October 21, 2015 16:50
-
-
Save pedrogimenez/7818bba7bbc2202c7cfa to your computer and use it in GitHub Desktop.
unused-indexes.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select innodb_index_stats.table_name, innodb_index_stats.index_name from mysql.innodb_index_stats where concat(innodb_index_stats.index_name, innodb_index_stats.table_name) not in(select concat(index_statistics.index_name, index_statistics.table_name) from information_schema.index_statistics) and innodb_index_stats.index_name<>'GEN_CLUST_INDEX' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment