pingcap / parser

A MySQL Compatible SQL Parser
Apache License 2.0
1.41k stars 489 forks source link

Plan recreator development task #1277

Closed rebelice closed 3 years ago

rebelice commented 3 years ago

Plan Recreator

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 RECREATOR provides two features:

Dump for slow queries

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

Load Information

tidb> plan recreator load 'file_name'

File Format The file plan-recreator.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

rebelice commented 3 years ago

I move it to tidb/issues/26325