Skip to content

Instantly share code, notes, and snippets.

@ericjsilva
Created May 4, 2018 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericjsilva/8f977811c5e5a7a2dbbb14a705790b25 to your computer and use it in GitHub Desktop.
Save ericjsilva/8f977811c5e5a7a2dbbb14a705790b25 to your computer and use it in GitHub Desktop.
Create MySQL Optimize statements
SELECT CONCAT('OPTIMIZE TABLE ',TABLE_NAME, ';') FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='my_schema';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment