-
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
planner: support cost model for tiflash table scan #12868
planner: support cost model for tiflash table scan #12868
Conversation
0c206fc
to
0029d66
Compare
Codecov Report
@@ Coverage Diff @@
## master #12868 +/- ##
===========================================
Coverage 80.4636% 80.4636%
===========================================
Files 465 465
Lines 109514 109514
===========================================
Hits 88119 88119
Misses 14889 14889
Partials 6506 6506 |
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.
Can you extract the changes of accounting key prefix size of TiKV and related test result changes into a separate PR for easier review and commit management?
…hh123/tidb into dev/support_cbo_for_tiflash
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
└─IndexScan_11 10000.00 cop[tikv] table:access_path_selection, index:a, b, range:[NULL,+inf], keep order:false, stats:pseudo | ||
TableReader_7 3323.33 root data:Selection_6 | ||
└─Selection_6 3323.33 cop[tikv] lt(Column#2, 3) | ||
└─TableScan_5 10000.00 cop[tikv] table:access_path_selection, range:[-inf,+inf], keep order:false, stats:pseudo |
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.
Looks like many cases in this file are meaningless now.
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.
It's somehow meaningful compared with other explain tests in the file.
…hh123/tidb into dev/support_cbo_for_tiflash
…hh123/tidb into dev/support_cbo_for_tiflash
0fcc6df
to
b8a6a7a
Compare
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 |
What problem does this PR solve?
Add a new table scan cost in the cost model to distinguish TiKV and TiFlash. Also, generate the TiFlash access path when a table has the TiFlash replica.
What is changed and how it works?
There are four steps:
len(Columns)
times. Then we add another cost to deal with the difference.Check List
Tests
Code changes
Side effects