mysql计算索引大小
MySQL中的索引是一种数据结构,用于加快查询操作的速度。随着索引的数量增加,数据库的性能会受到影响。这时候就需要计算索引的大小,以便确定数据库所需的磁盘空间等资源。
SELECT table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES WHERE table_schema = "[database_name]" ORDER BY (data_length + index_length) DESC;