You want to start monitoring statistics on the distribution of storage engines that are being used and the average sizes of tables in the various databases.<br /> Some details are as follows:<br /> The Mysql instance has 400 databases. Each database on an average consists of 25-50 tables. You use the query:<br /> SELECT TABLE_SCHEMA, 'ENGINE', COUNT (*), SUM(data_length) total_size FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE= 'BASE TABLE' GROUP BY TABLE_SCHEMA, 'ENGINE' ;<br /> Why is this query slow to execute?()<p> You want to start monitoring statistics on the distribution of storage engines that are being used and the average sizes of tables in the various databases.<br /> Some details are as follows:<br /> The Mysql instance has 400 databases. Each database on an average consists of 25-50 tables. You use the query:<br /> SELECT TABLE_SCHEMA, 'ENGINE', COUNT (*), SUM(data_length) total_size FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE= 'BA
A、A.Collecting information requires large numbers of locks on various INFORMATION_SCHEMA tables
B、B.Aggregating details from various storage engine caches for the final output is time consuming
C、C.Collecting information requires various disk-level operations and is time consuming
D、D.Counting and summarizing all table pages in the InnoDB shared tablespace is time consuming