Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-19267

unnecessary scanned all databases for information_schema

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Server
    • 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

          Activity

            People

              Unassigned Unassigned
              llamafilm Elliott Balsley
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.