xuchunlin
select
table_schema as \'数据库\',
table_name as \'表名\',
table_rows as \'记录数\',
truncate(data_length/1024/1024, 2) as \'数据容量(MB)\',
truncate(index_length/1024/1024, 2) as \'索引容量(MB)\'
from information_schema.tables
where table_schema=\'spider_2020\' and table_name = \'spider_72_ggzy_zrzyb_content\';

其中是spider_2020数据库,spider_72_ggzy_zrzyb_content是数据表名称

 

mysql压缩数据表命令

alter table spider_72_ggzy_zrzyb_content KEY_BLOCK_SIZE=8;

alter table spider_72_ggzy_zrzyb_content row_format=COMPRESSED;

其中 spider_72_ggzy_zrzyb_content 是数据表名称,压缩率在60%左右,10G文件,压缩后还剩6G

 

分类:

技术点:

相关文章: