Created
August 25, 2015 09:09
-
-
Save stilliard/4874172ac0ce7a4ea435 to your computer and use it in GitHub Desktop.
Select different indexes on the same table across all databases on a server (e.g. a `categories` table)
This file contains hidden or 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 table_name, index_name, GROUP_CONCAT(DISTINCT column_name), index_type | |
FROM information_schema.statistics | |
WHERE table_name = 'categories' | |
AND non_unique = 1 | |
GROUP BY table_name, index_name, index_type |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment