Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Any query to information_schema is extremely slow because it scans all databases. For example, this query takes over 3 seconds. This bug has been fixed in MySQL 8.0, so I tested in that version using the same data and this same query takes 0.03 seconds.
https://bugs.mysql.com/bug.php?id=81347
SELECT `update_time` FROM information_schema.tables;
|
...
|
5068 rows in set (3.289 sec)
|
 |
EXPLAIN SELECT update_time FROM information_schema.tables;
|
+------+-------------+--------+------+---------------+------+---------+------+------+----------------------------------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+------+-------------+--------+------+---------------+------+---------+------+------+----------------------------------------+
|
| 1 | SIMPLE | tables | ALL | NULL | NULL | NULL | NULL | NULL | Open_full_table; Scanned all databases |
|
+------+-------------+--------+------+---------------+------+---------+------+------+----------------------------------------+
|
1 row in set (0.002 sec)
|
|
Attachments
Issue Links
- relates to
-
MDEV-11655 Transactional data dictionary
- Open