To find Size of table in MySQL command prompt use below command
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" AND table_name = "table_name";
To find Size of Index of a table in MySQL command prompt use below command
mysql > SELECT table_name AS "Table", round(((index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "database_name" AND table_name = "table_name";
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" AND table_name = "table_name";
To find Size of Index of a table in MySQL command prompt use below command
mysql > SELECT table_name AS "Table", round(((index_length) / 1024 / 1024), 2) "Size in MB" FROM information_schema.TABLES WHERE table_schema = "database_name" AND table_name = "table_name";
0 comments:
Post a Comment