*: re-implement partition pruning for better performance (#14679)#15368
*: re-implement partition pruning for better performance (#14679)#15368tiancaiamao wants to merge 5 commits intopingcap:v3.0.11from
Conversation
|
PTAL @jackysp |
|
can you compare it with 3.0.5? |
|
v3.0.5 The bench result of same case is 19620187 ns/op There is no cost in |
|
I have to take a rest, when I wake up I'll continue with it and fix the CI. |
|
/run-all-tests |
|
/run-all-tests tidb-test=br/release-3.0 |
|
/run-integration-common-test |
|
/run-all-tests |
|
The CI hang... |
|
/build |
|
/run-all-tests pd=release-3.0 tikv=release-3.0 tidb-test=release-3.0 |
| Expr expression.Expression | ||
|
|
||
| // The new range partition pruning | ||
| *ForRangePruning |
There was a problem hiding this comment.
this is an optimization that avoids calculate lessThenData every time but doesn't exists in master branch?
There was a problem hiding this comment.
Yes, it's a TODO here https://github.com/pingcap/tidb/pull/15169/files#diff-0411f48b4045359c9f116ef6a779c3efR331
And another tiny change is lessThanData could be int/uint when I find a CI case fail.
https://github.com/pingcap/tidb/pull/15368/files#diff-1b0a7f60f2fea2fa689b1dfda250bc3dR1475 |
my mistake..- - |
|
/run-all-tests pd=release-3.0 tikv=release-3.0 tidb-test=release-3.0 |
|
LGTM |
|
/run-all-tests pd=release-3.0 tikv=release-3.0 tidb-test=release-3.0 |
|
Close as I've got the binary, this commit finish its mission. |


Cherry-pick #14679 to 3.0.11, make range pruning as fast as possible
Before:

79076815 ns/op
22.99% of CPU cost
After

251407 ns/op
1.09% of CPU cost