SELECT
table_name,
table_rows,
round(data_length/(1024*1024),2) as 'DATA_SIZE(MB)',
round(index_length/(1024*1024),2) as 'INDEX_SIZE(MB)'
FROM information_schema.TABLES
WHERE table_schema = 'DB_name'
GROUP BY table_name
ORDER BY data_length DESC LIMIT 10;
'DEV > MySql' 카테고리의 다른 글
마지막 update ID 구하기 (0) | 2021.05.27 |
---|---|
auto_increment 초기화 (0) | 2021.03.22 |
SELECT 결과 INSERT 하기 (0) | 2021.03.20 |