-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
plan: do not cache plan for query on range partition table #15697
Conversation
Codecov Report
@@ Coverage Diff @@
## master #15697 +/- ##
===========================================
Coverage ? 80.7021%
===========================================
Files ? 504
Lines ? 135746
Branches ? 0
===========================================
Hits ? 109550
Misses ? 17703
Partials ? 8493 |
can we block all query on partition table to be filled into plan cache? |
@zz-jason for hash partition, plan cache is supported. |
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.
LGTM
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.
LGTM
/run-all-tests |
@imtbkcat merge failed. |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.0 in PR #15748 |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.1 in PR #15749 |
cherry pick to release-4.0 in PR #15750 |
What problem does this PR solve?
Issue Number: close #15720
Problem Summary:
Query on range partition may return error when using prepared plan cache, because table id is written in physical plan. Some user may use partition + plan cache when TiDB 4.0-rc released. So currently let plan-cache do not cache query on range partition table.
What is changed and how it works?
Proposal: xxx
What's Changed:
Add
isRangePartition
to check whether a plan is on range partition table.How it Works:
If a plan is on range partition table, plan cache will not cache it.
Related changes
pingcap/docs
/pingcap/docs-cn
:pingcap/tidb-ansible
:Check List
Tests
Side effects
Release note