Created
March 10, 2019 17:25
-
-
Save iflamed/6da2d177f754f6633e69503d1f1a5c24 to your computer and use it in GitHub Desktop.
数据表碎片优化
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 concat('optimize table ',table_schema,'.',table_name,';'),data_free,engine | |
from information_schema.tables | |
where data_free>0 and engine !='MEMORY' | |
ORDER BY data_free DESC ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment