首页 > 数据库技术 > 详细

【查阅】mysql系统视图查看

时间:2019-03-08 13:33:12      阅读:202      评论:0      收藏:0      [点我收藏+]

【1】查看表大小

SELECT
    CONCAT(table_schema,‘.‘,table_name) AS ‘Table Name‘,
    table_rows AS ‘Number of Rows‘,
    CONCAT(ROUND(data_length/(1024*1024),3),‘ MB‘) AS ‘Data Size‘,
    CONCAT(ROUND(index_length/(1024*1024),3),‘ MB‘) AS ‘Index Size‘,
    CONCAT(ROUND((data_length+index_length)/(1024*1024),3),‘ MB‘) AS ‘Total Size‘
FROM
    information_schema.TABLES
WHERE
    table_schema = ‘test‘ AND table_name in (‘test101‘,‘test102‘);

 

【查阅】mysql系统视图查看

原文:https://www.cnblogs.com/gered/p/10495044.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!