引擎版本 | 是否涉及 |
MySQL 5.7 | 是 |
MySQL 8.0 | 是 |
set session sql_mode='';select t.table_schema,t.table_name,(data_length + index_length)/1024/1024/1024 as size_Gfrom information_schema.tables tjoin information_schema.INNODB_SYS_TABLES syston concat(t.table_schema,'/',t.table_name) = substring_index(syst.NAME,'#',1)where syst.SPACE = 0group by t.table_schema, t.table_nameorder by size_G desclimit 10;
set session sql_mode='';select t.table_schema,t.table_name,(data_length + index_length)/1024/1024/1024 as size_Gfrom information_schema.tables tjoin information_schema.INNODB_TABLES syston concat(t.table_schema,'/',t.table_name) = substring_index(syst.NAME,'#',1)where syst.SPACE = 0group by t.table_schema, t.table_nameorder by size_G desclimit 10;
ALTER TABLE $db.$tb ENGINE = INNODB, ALGORITHM=INPLACE, LOCK=NONE;
文档反馈