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

EXPLAIN plan Documentation outdated

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      Many changes have been made to the InnoDB engine and the Optimizer since 10.5. These changes have affected the output of the `EXPLAIN` and a lot of new items have been added which are missing documentation and details for instance: https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/analyze-and-explain-statements/explain

      As an example, refer to the following plan.

      +------+-------------+-------+------------+---------------------------+---------------------------+---------+-------+--------------+---------------------------------+
      | id   | select_type | table | type       | possible_keys             | key                       | key_len | ref   | rows         | Extra                           |
      +------+-------------+-------+------------+---------------------------+---------------------------+---------+-------+--------------+---------------------------------+
      |    1 | SIMPLE      | deal  | ref|filter | dealref_idx,transref_idx1 | transref_idx1|dealref_idx | 14|50   | const | 1906508 (0%) | Using where; Using rowid filter |
      +------+-------------+-------+------------+---------------------------+---------------------------+---------+-------+--------------+---------------------------------+
      

      Here under the column `type`, we can see `ref|filter`. What does this mean? Similarly, the `key` column has two indexes separated by a PIPE, is this referring to a MERGE index or something else? Finally, the `rows` column has a `(0%)`. What does this represent?

      This is just an example, and we need all the changes in the EXPLAIN/EXPLAIN JSON documented with details for the proper reference and understanding.

      Attachments

        Issue Links

          Activity

            People

              dbart Daniel Bartholomew
              Faisal Faisal Saeed (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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