1. 查詢elisun庫下全部表各自的行數和佔用磁盤大小orm
SELECT TABLE_NAME,TABLE_ROWS,(DATA_LENGTH+INDEX_LENGTH)/1024/1024 AS TOTAL_MB FROM information_schema.TABLES WHERE TABLE_SCHEMA='elisun' ORDER BY TABLE_ROWS DESC limit 100;it
2. 查詢elisun庫全部表的總行數及佔用磁盤的總大小io
SELECT sum(TABLE_ROWS),sum((DATA_LENGTH+INDEX_LENGTH)/1024/1024) FROM information_schema.TABLES WHERE TABLE_SCHEMA='elisun';form