1. 程式人生 > >【查閱】mysql系統視圖查看

【查閱】mysql系統視圖查看

class ont table mat nbsp sele HERE rom pre

【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系統視圖查看