Skip to content

Instantly share code, notes, and snippets.

@stilliard
Created February 24, 2019 00:33
Show Gist options
  • Save stilliard/f496a86b22e29c9607af7b3ad8301361 to your computer and use it in GitHub Desktop.
Save stilliard/f496a86b22e29c9607af7b3ad8301361 to your computer and use it in GitHub Desktop.
Check all database's tables to see if keys are disabled
# Will print database name & tables that have keys disabled
SELECT TABLE_SCHEMA, TABLE_NAME
FROM information_schema.STATISTICS
WHERE comment = 'disabled'
GROUP BY TABLE_SCHEMA, TABLE_NAME;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment