1、查看库空间下的表

 show table status from mongodb_biddata;
 SELECT 
 SUM(data_length+index_length)/1024/1024/1024 AS gb_total_data_size, 
 SUM(data_free)/1024/1024/1024 AS gb_total_free_space 
FROM 
information_schema.tables 
WHERE 
table_schema='库名';

mysql库表空间使用情况_数据

2、方法二

 SELECT
     table_name AS '表名',
     round(((data_length + index_length) / 1024 / 1024), 2) AS '总大小(MB)',
     round((data_length / 1024 / 1024), 2) AS '数据大小(MB)',
     round((index_length / 1024 / 1024), 2) AS '索引大小(MB)'
 FROM
     information_schema.tables
 WHERE
     table_schema = '库名'
 ORDER BY
     (data_length + index_length) DESC;

mysql库表空间使用情况_数据_02

推荐方法二,清晰明了