Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
数据表碎片优化
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