-
Notifications
You must be signed in to change notification settings - Fork 709
sql-statements: add sql statements for sql bind #2927
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
Merged
ran-huang
merged 16 commits into
pingcap:master
from
lzmhhh123:dev/add_sql_statement_binding
Jun 19, 2020
Merged
sql-statements: add sql statements for sql bind #2927
ran-huang
merged 16 commits into
pingcap:master
from
lzmhhh123:dev/add_sql_statement_binding
Jun 19, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ran-huang
reviewed
Jun 17, 2020
|
|
||
| This statement binds SQL execution plans at the GLOBAL or SESSION level. The default scope is SESSION. The bound SQL statement is parameterized and stored in the system table. When a SQL query is processed, as long as the parameterized SQL statement and a bound one in the system table are consistent and the system variable `tidb_use_plan_baselines` is set to `on` (the default value is `on`), the corresponding optimizer hint is available. If multiple execution plans are available, the optimizer chooses to bind the plan with the least cost. | ||
|
|
||
| When a SQL statement has bound execution plans in both GLOBAL and SESSION scopes, because the optimizer ignores the bound execution plan in the GLOBAL scope when it encounters the SESSION binding, the bound execution plan of this statement in the SESSION scope shields the execution plan in the GLOBAL scope. |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一段好像没有对应的中文?
Co-authored-by: Ran <huangran@pingcap.com>
Co-authored-by: Ran <huangran@pingcap.com>
Co-authored-by: Ran <huangran@pingcap.com>
Co-authored-by: Ran <huangran@pingcap.com>
Co-authored-by: Ran <huangran@pingcap.com>
Co-authored-by: Ran <huangran@pingcap.com>
Co-authored-by: Ran <huangran@pingcap.com>
Co-authored-by: Ran <huangran@pingcap.com>
Co-authored-by: Ran <huangran@pingcap.com>
ran-huang
reviewed
Jun 19, 2020
ran-huang
approved these changes
Jun 19, 2020
Contributor
|
/merge |
Contributor
|
/run-all-tests |
Contributor
|
@lzmhhh123 merge failed. |
Contributor
|
/merge |
Contributor
|
/run-all-tests |
ti-srebot
pushed a commit
to ti-srebot/docs
that referenced
this pull request
Jun 19, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
5 tasks
Contributor
|
cherry pick to release-4.0 in PR #2967 |
ran-huang
pushed a commit
that referenced
this pull request
Jun 19, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com> Co-authored-by: Zhuomin(Charming) Liu <lzmhhh123@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
status/can-merge
Indicates a PR has been approved by a committer.
status/PTAL
This PR is ready for reviewing.
translation/from-docs-cn
This PR is translated from a PR in pingcap/docs-cn.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?