Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plan replayer development task #26325

Open
8 of 11 tasks
rebelice opened this issue Jul 19, 2021 · 0 comments
Open
8 of 11 tasks

Plan replayer development task #26325

rebelice opened this issue Jul 19, 2021 · 0 comments
Assignees

Comments

@rebelice
Copy link
Contributor

rebelice commented Jul 19, 2021

Plan Replayer

Provide all the information required to reproduce the implementation plan for import/export. Provide a simple, one-stop collection and retention of the event of the scene, simplifying the inspection information extraction steps of the optimizer-related issues.

Description

PLAN REPLAYER provides three features:

  • One-click Export/Import Information Reproducing Single SQL
  • One-click Export/Importing Information Reproducing Slow Queries
  • Load Information to Reproducing Query Plans

Dump for one SQL

tidb> plan replayer dump explain [analyze] sqlStmt
  • sqlStmt parameter is the specified SQL statement
  • explain [Analyze] is used to specify back explain or Explain Analyze information
  • This statement will return a single-active URL for download files such as http://${tidb-server-ip}:${tidb-server-status-port}/plan_replayer/dump/xxxx

Dump for slow queries
tidb> plan recretor dump explain [analyze] slow query [filtering]

  • explain [Analyze] is used to specify back explain or Explain Analyze information
  • [filtering] is used to filter slow inquiry in Slow Query Table, support:
    • WHERE
    • ORDER BY
    • Limit
  • This statement will return a single-active URL for download files such as http://${tidb-server-ip}:${tidb-server-status-port}/plan_replayer/dump/xxxx

Load Information

tidb> plan replayer load 'file_name'

File Format
The file plan-replayer.zip format is as follows:

|-meta.txt
|-schema.sql
|-stats
|   |-stats1.json
|   |-stats2.json
|   |-....
|-config.toml
|-variables.toml
|-bindings.sql
|-sqls.sql
|_explain
    |-explain1.txt
    |-explain2.txt

Development task

Enhancement

Bugfix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant