Bug #45364 Accessing information_schema
Submitted: 8 Jun 2009 8:38 Modified: 9 Jul 2009 9:33
Reporter: zohar aharoni Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Information schema Severity:S5 (Performance)
Version:5.1.23 OS:Any
Assigned to: CPU Architecture:Any
Tags: indexes, information_schema, performance

[8 Jun 2009 8:38] zohar aharoni
Description:
Hi,
I'm using some information_schema tables for monitoring purposes (for example - make sure that I have enough partitions ahead for partitioned table...)
and as time goes by the queries against i_s.partitions become very very slow.
I noticed that the i_s tables are temporary tables (some MyIsam and some Memory) and that there are no indexes on them what make query performance poor.

Is it possible to create i_s tables with indexes so queries will run more efficiently?

Thanks!

How to repeat:
(root@localhost) [information_Schema]> explain select table_schema, table_name, partition_name from information_Schema.partitions where table_schema='abcd' and table_name='efgh'\G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: partitions
         type: ALL
possible_keys: NULL
          key: NULL
      key_len: NULL
          ref: NULL
         rows: NULL
        Extra: Using where

Suggested fix:
create the i_s tables with indexes?
[9 Jun 2009 9:33] Valeriy Kravchuk
Thank you for the problem report. Please, check if you'll get better perfromance with a newer version of MySQL 5.1, 5.1.34 at least. Fixed bug #19588 is one of the reasons for this request.
[9 Jul 2009 23:01] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".