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

intuitively observe whether a SQL used session or global binding #16425

Closed
1 of 4 tasks
zz-jason opened this issue Apr 15, 2020 · 2 comments · Fixed by #18017
Closed
1 of 4 tasks

intuitively observe whether a SQL used session or global binding #16425

zz-jason opened this issue Apr 15, 2020 · 2 comments · Fixed by #18017
Assignees
Labels
component/bindinfo epic/sql-plan-management sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Milestone

Comments

@zz-jason
Copy link
Member

zz-jason commented Apr 15, 2020

Description

#16127 suggests adding additional information to indicate that a query hit the plan cache.

SQL Plan Binding may also need the same improvement: how to intuitively observe whether a SQL used the session or global level binding?

For now, users have to check whether the execution plan is matched with the hints in the binding. But this method requires the user to be very similar to the optimizer and SQL hint behaviors.

Considered that the binding creator and the binding user might not the same person. For example, a binding creator may be the database administrator while a user may be the application developer.

Like plan cache, it's better to display this information in:

  • Grafana monitor, we already have
  • statement summary table
  • slow log
  • a session variable like @@last_plan_from_baselines to indicate whether the last executed statement used the plan specified by SPM plan baselines.
@zz-jason zz-jason added type/enhancement The issue or PR belongs to an enhancement. sig/planner SIG: Planner labels Apr 15, 2020
@zz-jason zz-jason changed the title intuitively observe whether a SQL used the session or global level binding intuitively observe whether a SQL used session or global binding Apr 15, 2020
@zz-jason
Copy link
Member Author

@eurekaka, @lzmhhh123 PTAL

@Reminiscent
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/bindinfo epic/sql-plan-management sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
7 participants