[MDEV-6498] SHOW EXPLAIN and PERFORMANCE_SCHEMA integration Created: 2014-07-28  Updated: 2015-11-17

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

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


 Description   

(Ideas based on initial discussion with stephanevaroqui in Budapest.

SHOW EXPLAIN feature should be integrated with PERFORMANCE_SCHEMA.

PERFORMANCE_SCHEMA has tables that describe statements together with information about their execution:

  1. events_statements_current
  2. events_statements_history
  3. events_statements_history_long
  4. events_statements_summary_by_digest

#1-#3 have info about individual statements, #4 describes a group of statements with the same digest.

As for #1-#3:
The straightforward decision is to add a column with EXPLAIN info. On the other hand, it will add extra mem/cpu overhead for those who don't need it. Maybe, it is better to keep EXPLAINs in a separate table.

As for #4, there is a question which query plans should be there. Maybe, we should provide query plans from the best and the worst execution? The idea about putting EXPLAINs in a separate table applies here, too.

In case we store EXPLAINs in a separate table(s), we could use P_S.setup_consumers to control whether EXPLAINs would be saved.


Generated at Thu Feb 08 07:12:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.