Skip to content

Instantly share code, notes, and snippets.

@stucka
Created January 4, 2016 22:06
Show Gist options
  • Save stucka/fc14d32ad13dd80a3996 to your computer and use it in GitHub Desktop.
Save stucka/fc14d32ad13dd80a3996 to your computer and use it in GitHub Desktop.
Check MySQL for defragmentation
select ENGINE, table_schema as DB, TABLE_NAME,Round( DATA_LENGTH/1024/1024) as data_length , round(INDEX_LENGTH/1024/1024) as index_length, round(DATA_FREE/ 1024/1024) as data_free from information_schema.tables;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment