查询库下面的表的文件大小已mysql库为例
select
TABLE_NAME,
concat(truncate(data_length/1024/1024,2),‘ MB‘) as data_size,
concat(truncate(index_length/1024/1024,2),‘ MB‘) as index_size
from information_schema.tables
where TABLE_SCHEMA = ‘mysql‘
group by TABLE_NAME
order by data_length desc;
统计mysql 重复数据已name字段为例
select name ,count() as count from zipkin_spans group by name having count >1;
统计mysql表的数据总数
select count() from zipkin_spans;
mysql 查询语句
原文:http://blog.51cto.com/8934920/2154084