Finding out largest tables on MySQL Server

Posted 长城之上是千亿的星空,星空之上是不灭的守望。

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Finding out largest tables on MySQL Server相关的知识,希望对你有一定的参考价值。

 
SELECT CONCAT(table_schema, ‘.‘, table_name),
       CONCAT(ROUND(table_rows / 1000000, 2), ‘M‘) rows,
       CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), ‘G‘) DATA,
       CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), ‘G‘) idx,
       CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), ‘G‘) total_size,
       ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC
LIMIT 10;

以上是关于Finding out largest tables on MySQL Server的主要内容,如果未能解决你的问题,请参考以下文章

7.6 Models -- Finding Records

Finding Black Holes 1

FINDING THE FACTS

PAT 1108 Finding Average

Finding Nemo_BFS

POJ 3376 Finding Palindromes