1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > mysql查询数据库每张表数据量大小和占用多少空间

mysql查询数据库每张表数据量大小和占用多少空间

时间:2023-12-01 03:19:25

相关推荐

mysql查询数据库每张表数据量大小和占用多少空间

selecttable_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.tableswhere table_schema='数据库名称'order by data_length desc, index_length desc;

输出结果

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。