mysqlÔõÑù²é¿´±íµÄ´óС
mysql ²é¿´±íµÄ´óС°ì·¨£º1¡¢²é¿´ËùÓÐÊý¾Ý¿â¸÷±íÈÝÁ¿´óС£¬´úÂëΪ¡¾truncate(data_length/1024/1024, 2) as 'Êý¾ÝÈÝÁ¿(MB)'¡¿£»2¡¢²é¿´Ö¸¶¨Êý¾Ý¿â¸÷±íÈÝÁ¿´óС¡£
mysql ²é¿´±íµÄ´óС°ì·¨£º
1.²é¿´ËùÓÐÊý¾Ý¿âÈÝÁ¿´óС
select table_schema as 'Êý¾Ý¿â', sum(table_rows) as '¼ÇÔØÊý', sum(truncate(data_length/1024/1024, 2)) as 'Êý¾ÝÈÝÁ¿(MB)', sum(truncate(index_length/1024/1024, 2)) as 'Ë÷ÒýÈÝÁ¿(MB)' from information_schema.tables group by table_schema order by sum(data_length) desc, sum(index_length) desc;
2.²é¿´ËùÓÐÊý¾Ý¿â¸÷±íÈÝÁ¿´óС
select table_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.tables order by data_length desc, index_length desc;
3.²é¿´Ö¸¶¨Êý¾Ý¿âÈÝÁ¿´óС
Àý£º²é¿´mysql¿âÈÝÁ¿´óС
select table_schema as 'Êý¾Ý¿â', sum(table_rows) as '¼ÇÔØÊý', sum(truncate(data_length/1024/1024, 2)) as 'Êý¾ÝÈÝÁ¿(MB)', sum(truncate(index_length/1024/1024, 2)) as 'Ë÷ÒýÈÝÁ¿(MB)' from information_schema.tables where table_schema='mysql';
4.²é¿´Ö¸¶¨Êý¾Ý¿â¸÷±íÈÝÁ¿´óС
Àý£º²é¿´mysql¿â¸÷±íÈÝÁ¿´óС
select table_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.tables where table_schema='mysql' order by data_length desc, index_length desc;
Ïà¸Éѧϰ¾Ù¼ö£ºmysql½Ì³Ì
ÒÔÉϾÍÊÇmysql ÔõÑù²é¿´±íµÄ´óСµÄϸÖÂÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢ °Ù·Ö°ÙÔ´ÂëÍø ÆäËüÏà¸ÉÎÄÕ£¡
![È¡Ïû](http://www.baidow.com/ds/img/close.jpg)
![°Ù·Ö°ÙÔ´ÂëÍø](http://www.baidow.com/ds/img/logos.png)
¸ÐлÄúµÄÖ§³Ö£¬ÎÒ»á¼ÌÐøŬÁ¦µÄ!
![ɨһɨ ɨÂëÖ§³Ö](http://www.baidow.com/ds/img/alipayimg.jpg)
![Ö§¸¶±¦](http://www.baidow.com/ds/img/alipay.jpg)
![΢ÐÅ](http://www.baidow.com/ds/img/wechat.jpg)
´ò¿ªÖ§¸¶±¦É¨Ò»É¨£¬¼´¿É½øÐÐɨÂë´òÉÍŶ
°Ù·Ö°ÙÔ´ÂëÍø ½¨Òé´òÉÍ1¡«10Ôª£¬ÍÁºÀËæÒ⣬¸ÐлÄúµÄÔĶÁ£¡