planner: Explain Explore returns a new column to help user create bindings more easily
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Now `Explain Explore` returns a SQL like `CREATE GLOBAL BINDING FROM HISTORY USING PLAN DIGEST 'fb7ba1191ca76f8d9a73c7180d7ba3cbb4043dec48ceb45752d0796006a190c7'` to help users create such a binding.
But this `USING PLAN DIGEST` command requires this plan to be stored in `mysql.statement_summary`, but on the cloud, `mysql.statement_summary` might not be available.
But if we return the whole original query like `CREATE GLOBAL BINDING USING SELECT /*+ */ * FROM ...`, the result could be too long and contain some invisible characters, which prevent the user from copying and pasting the command to create such a binding.
To solve this, maybe we could return a new column like `CREATE GLOBAL BINDING USING 'a3F...xtP'`, where `a3F...xtP` is base64 encoded and compressed from the original query, which is used to make the result shorter and remove all invisible characters.
Contributor guide
Assessment
This issue has not been assessed yet.