[MDEV-27776] Make EXPLAIN show filtered and partitions columns Created: 2022-02-08  Updated: 2023-12-05

Status: Stalled
Project: MariaDB Server
Component/s: Optimizer
Fix Version/s: 11.1

Type: Task Priority: Major
Reporter: Sergei Petrunia Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-10000 Add EXPLAIN FOR CONNECTION syntax sup... Closed

 Description   

MDEV-10000 adds EXPLAIN FOR CONNECTION for compatibility with MySQL-8.

In MySQL-8, EXPLAIN FOR CONNECTION produces filtered and partitions columns. This means that anybody using EXPLAIN FOR CONNECTION syntax will expect these columns.

On the other hand, in MariaDB, regular EXPLAIN and SHOW EXPLAIN do not show the extra columns.

How can we be consistent across all commands? The solution is to first do what MySQL 5.7 did:

  • make the EXPLAIN command produce partitions and filtered columns.
  • then, make SHOW EXPLAIN and EXPLAIN FOR CONNECTION produce them, too.


 Comments   
Comment by Sergei Petrunia [ 2022-02-08 ]

Things to check:

  • Do we need to mark EXPLAIN PARTITIONS and EXPLAIN EXTENDED as deprecated?
  • Should EXPLAIN produce the warning with rewritten query, like EXPLAIN EXTENDED currently does?
Comment by Oleg Smirnov [ 2022-02-08 ]

Do you think it makes sense to implement this in the same bb-10.8-MDEV-10000 branch rather than in a new one?

Comment by Sergei Petrunia [ 2022-02-11 ]

oleg.smirnov, yes. Please implement this over bb-10.8-MDEV-10000 branch

Comment by Oleg Smirnov [ 2022-03-03 ]

After discussion on today's call we came to decisions:

  • EXPLAIN SELECT prints "partitions", "filtered" columns and produces the warning with rewritten query
  • EXPLAIN EXTENDED and EXPLAIN PARTITIONS produce the same output as EXPLAIN SELECT
    and two warnings, the second warning is about EXPLAIN EXTENDED| PARTITIONS being deprecated (like MySQL 5.7 does)
Comment by Julien Fritsch [ 2023-12-05 ]

Automated message:
----------------------------
Since this issue has not been updated since 6 weeks, it's time to move it back to Stalled.

Comment by JiraAutomate [ 2023-12-05 ]

Automated message:
----------------------------
Since this issue has not been updated since 6 weeks, it's time to move it back to Stalled.

Generated at Thu Feb 08 09:55:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.