SELECT TABLE_NAME, DATA_LENGTH + INDEX_LENGTH, TABLE_ROWS, concat(round((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024,2),'MB') AS DATA FROM information_schema. TABLES WHERE TABLE_SCHEMA = 'mydata' #数据库名 ORDER BY DATA + 0 DESC;
SELECT TABLE_NAME, DATA_LENGTH + INDEX_LENGTH, TABLE_ROWS, concat(round((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024,2),'MB') AS DATA FROM information_schema. TABLES WHERE TABLE_SCHEMA = 'mydata' #数据库名 ORDER BY DATA + 0 DESC;