-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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.