Skip to content

planner: Explain Explore returns a new column to help user create bindings more easily #65987

@qw4990

Description

@qw4990

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.

Metadata

Metadata

Assignees

Labels

sig/plannerSIG: Plannertype/enhancementThe issue or PR belongs to an enhancement.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions