SELECT TABLE_NAME AS "Table Name",
table_rows AS "Quant of Rows", ROUND( (
data_length + index_length
) /1024, 2 ) AS "Total Size Kb"
FROM information_schema.TABLES
WHERE information_schema.TABLES.table_schema = 'YOUR SCHEMA NAME/DATABASE NAME HERE'
LIMIT 0 , 30
Anda bisa mendapatkan nama skema dari " information_schema " -> tabel SCHEMATA -> kolom " SCHEMA_NAME "
Tambahan
Anda bisa mendapatkan ukuran database mysql sebagai berikut.
SELECT table_schema "DB Name",
Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
FROM information_schema.tables
GROUP BY table_schema;
Hasil
DB Name | DB Size in MB
mydatabase_wrdp 39.1
information_schema 0.0
Anda bisa mendapatkan detail tambahan di sini.