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

Add EXPLAIN FOR CONNECTION syntax support to SHOW EXPLAIN

Details

    Description

      MariaDB has SHOW EXPLAIN, and MySQL 5.7 got EXPLAIN FOR CONNECTION.
      We should support EXPLAIN FOR CONNECTION syntax for compatibility purposes.

      Attachments

        Issue Links

          Activity

            psergei Sergei Petrunia created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            Priority Major [ 3 ] Minor [ 4 ]
            greenman Ian Gilfillan made changes -
            Labels Compatibility
            psergei Sergei Petrunia made changes -
            Labels Compatibility Compatibility optimizer
            psergei Sergei Petrunia made changes -
            Assignee Sergei Krivonos [ JIRAUSER49805 ]

            Considerations:

            • It is much harder to produce EXPLAIN FORMAT=JSON output than tabular format output.
              • IIRC, MySQL supports EXPLAIN FORMAT=JSON FOR CONNECTION, but the output lacks some details
            • Because of the above, we can start by supporting a tabular form in EXPLAIN FOR CONNECTION.
            • Can we print ANALYZE [ FORMAT=JSON] for the other thread?
            psergei Sergei Petrunia added a comment - Considerations: It is much harder to produce EXPLAIN FORMAT=JSON output than tabular format output. IIRC, MySQL supports EXPLAIN FORMAT=JSON FOR CONNECTION, but the output lacks some details Because of the above, we can start by supporting a tabular form in EXPLAIN FOR CONNECTION. Can we print ANALYZE [ FORMAT=JSON] for the other thread?
            psergei Sergei Petrunia made changes -
            Fix Version/s 10.7.1 [ 26120 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.7.1 [ 26120 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.7 [ 24805 ]
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Summary 10.2: Add EXPLAIN FOR CONNECTION syntax support to SHOW EXPLAIN Add EXPLAIN FOR CONNECTION syntax support to SHOW EXPLAIN
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            psergei Sergei Petrunia made changes -
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Rank Ranked higher
            psergei Sergei Petrunia made changes -
            Rank Ranked higher
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 75476 ] MariaDB v4 [ 131659 ]
            psergei Sergei Petrunia made changes -
            Assignee Sergei Krivonos [ JIRAUSER49805 ]
            oleg.smirnov Oleg Smirnov made changes -
            Assignee Oleg Smirnov [ JIRAUSER50405 ]
            oleg.smirnov Oleg Smirnov made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.9 [ 26905 ]
            Fix Version/s 10.8 [ 26121 ]
            psergei Sergei Petrunia added a comment - Review input: https://lists.launchpad.net/maria-developers/msg13074.html
            oleg.smirnov Oleg Smirnov added a comment -

            Yes, I'm surprised how this did work on my machine. I added the initialization and force-pushed into the same branch.

            oleg.smirnov Oleg Smirnov added a comment - Yes, I'm surprised how this did work on my machine. I added the initialization and force-pushed into the same branch.

            Ok. Please in the future do not have two branches with similar names like bb-10.8-MDEV-10000 and bb-10.8-mdev-10000. This is confusing

            psergei Sergei Petrunia added a comment - Ok. Please in the future do not have two branches with similar names like bb-10.8- MDEV-10000 and bb-10.8-mdev-10000 . This is confusing

            One other thing to consider:

            In MySQL:

            EXPLAIN FOR CONNECTION produces "partitions" and "filtered" columns.
            These columns are also part of regular EXPLAIN output (Initially
            they weren't and one had to use EXPLAIN EXTENDED to get the "filtered"
            column and EXPLAIN PARTITIONS to get the "partitions")

            In MariaDB:
            EXPLAIN doesn't produce "partitions" or "filtered". One needs to use
            EXPLAIN (EXTENDED|PARTITIONS).

            The current patch doesn't produce "partitions" or "filtered".

            But since we're aiming at MySQL compatibility perhaps we should do that?

            psergei Sergei Petrunia added a comment - One other thing to consider: In MySQL: EXPLAIN FOR CONNECTION produces "partitions" and "filtered" columns. These columns are also part of regular EXPLAIN output (Initially they weren't and one had to use EXPLAIN EXTENDED to get the "filtered" column and EXPLAIN PARTITIONS to get the "partitions") In MariaDB: EXPLAIN doesn't produce "partitions" or "filtered". One needs to use EXPLAIN (EXTENDED|PARTITIONS). The current patch doesn't produce "partitions" or "filtered". But since we're aiming at MySQL compatibility perhaps we should do that?
            oleg.smirnov Oleg Smirnov added a comment - - edited

            Sorry for the confusion, bb-10.8-MDEV-10000 is the actual branch. I removed the other one having lowercase mdev.

            Regarding "partitions" and "filtered": is we add these fields only to EXPLAIN FOR CONNECTION output wouldn't it be inconsistent that SHOW EXPLAIN displays one set of columns and EXPLAIN FOR CONNECTION - another one? Doesn't it make sense to add those fields to SHOW EXPLAIN output as well?

            oleg.smirnov Oleg Smirnov added a comment - - edited Sorry for the confusion, bb-10.8- MDEV-10000 is the actual branch. I removed the other one having lowercase mdev. Regarding "partitions" and "filtered": is we add these fields only to EXPLAIN FOR CONNECTION output wouldn't it be inconsistent that SHOW EXPLAIN displays one set of columns and EXPLAIN FOR CONNECTION - another one? Doesn't it make sense to add those fields to SHOW EXPLAIN output as well?
            psergei Sergei Petrunia made changes -

            Filed MDEV-27776 about addressing filtered and partitions column.

            psergei Sergei Petrunia added a comment - Filed MDEV-27776 about addressing filtered and partitions column.
            psergei Sergei Petrunia made changes -
            Status In Progress [ 3 ] In Testing [ 10301 ]
            psergei Sergei Petrunia made changes -
            Assignee Oleg Smirnov [ JIRAUSER50405 ]
            serg Sergei Golubchik made changes -
            elenst Elena Stepanova made changes -
            Assignee Elena Stepanova [ elenst ]
            elenst Elena Stepanova made changes -
            alice Alice Sherepa made changes -
            Assignee Elena Stepanova [ elenst ] Alice Sherepa [ alice ]
            alice Alice Sherepa made changes -
            Status In Testing [ 10301 ] Stalled [ 10000 ]
            psergei Sergei Petrunia made changes -
            Fix Version/s 10.9.1 [ 27114 ]
            Fix Version/s 10.9 [ 26905 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Labels Compatibility optimizer Compatibility Preview_10.9 optimizer

            People

              alice Alice Sherepa
              psergei Sergei Petrunia
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.