Commit Graph

155 Commits

Author SHA1 Message Date
ceddc106f0 executor,planner/core,util/plancodec: extend executor.ShuffleExec and planner.core.PhysicalShuffle to support multiple data sources (#20942) 2020-11-24 10:59:03 +08:00
38bbb0dd21 planner: ban (index) merge join heuristically when convert eq cond to other cond (#21138) 2020-11-19 17:17:53 +08:00
dy
a426a0e5ff planner: disallow multi-updates on primary key (#20603) 2020-11-17 18:33:53 +08:00
f72cec77b6 *: support SQL bind for Update / Delete / Insert / Replace (#20686) 2020-11-17 15:19:04 +08:00
41786cb976 *: seperate hash keys from join keys in IndexJoin (#20761) 2020-11-16 16:24:51 +08:00
5aada1f4ef planner: add unit test for tidb_opt_prefer_range_scan variable (#20672) 2020-11-13 17:53:34 +08:00
1804f4c53a planner: generate proper hint for IndexHashJoin / IndexMergeJoin (#20992) 2020-11-12 17:28:54 +08:00
5a14eb592c planner: fix index merge doesn't take effect when using prefix key (#20425) 2020-11-12 12:25:53 +08:00
a338e35932 expression: fix wrong inferred type for sum and avg (#20926) 2020-11-11 14:10:34 +08:00
3e306aeae0 planner: don't push down topN above outer join when topN refer scalar subquery expression (#20099) 2020-11-09 11:42:32 +08:00
76c1d28af9 planner: support complex join in broadcast join (#20196) 2020-11-05 16:29:35 +08:00
a53c1d05b1 expression: Support some cast functions push down to TiFlash (#20787) 2020-11-04 15:21:01 +08:00
a2e1aff6e5 *:Fix the bug of consistent plan but inconsistent plan digest (#20660) 2020-11-02 19:36:55 +08:00
ff428983e0 planner: estimate cardinality of agg / join by GroupNDV (#18058) 2020-10-27 11:09:57 +08:00
66b241e440 planner: correlated column with unique constraint can help to eliminate MaxOneRow (#20259)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-10-22 17:02:28 +08:00
4501f6d7ab planner, executor: enable inline projection for Limit (#20288) 2020-10-19 10:55:13 +08:00
3ceceece2a planner: choose index with larger NDV on join keys for IndexJoin (#20250) 2020-10-13 11:05:04 +08:00
ced01b2333 planner: estimate index row count using extended correlation stats (#20160) 2020-10-12 15:52:52 +08:00
462a53f79a expression: utilize the flag of column arguments to simplify expressions (#20149) 2020-10-09 14:43:11 +08:00
b565ee0546 planner: prune duplicate expr in sort (#20325) 2020-10-02 23:38:29 +08:00
170e2fec92 *: collect multiple partitions and store in tidb (part II) (#19899) 2020-09-29 21:25:56 +08:00
421e87c5f1 planner: improve index merge row count estimation (#19040) 2020-09-27 18:06:36 +08:00
aceecf0732 executor: support new aggregate funtion APPROX_PERCENTILE (#19799)
Signed-off-by: leiysky <leiysky@outlook.com>
2020-09-24 15:59:38 +08:00
fd0299f58e *: remove simple rewriter (#19828) 2020-09-23 12:17:53 +08:00
151ef8492b statistics: prioritize low selectivity indexes in the greedy search procedure of Selectivity() (#20038) 2020-09-22 19:17:42 +08:00
0684dba6c8 util/ranger: extract multi-column DNF conditions as access conditions (#19211) 2020-09-17 20:08:34 +08:00
ac844a7162 planner: fix bug of plan digest is same when cop task store is different (#20054) 2020-09-17 19:55:28 +08:00
31bd7d8b3d planner: rename optimizer hint TOPN_TO_COP() to LIMIT_TO_COP() (#20022) 2020-09-17 14:23:23 +08:00
4b7c5db8ab planner: add cluster index in explain info of point get plan (#19867) 2020-09-16 12:23:09 +08:00
f388b094df planner: add optimizer hint TOPN_TO_COP() (#19545)
* planner: add TopN_To_Cop hint.

* go fmt.

* add a method canPushToCop() to check if it is valid to push the TopN down.

* add unit test case for warning.

* gofmt.

Co-authored-by: Yuanjia Zhang <zhangyuanjia@pingcap.com>
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-09-10 17:18:20 +08:00
1cab3d5947 *: fix bug of same type plans with different plan digest (#19519) 2020-09-01 21:55:20 +08:00
b78f4896fe statistics, util/ranger: improve selectivity calculation for DNF filters (#18741) 2020-08-27 15:40:12 +08:00
e52cb3714e planner: Do not pushdown unsupported function to tiflash in TopN operator (#19363)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-08-25 17:20:18 +08:00
84e07a2a59 planner: propagate NDV of column groups across plan nodes (#17854) 2020-08-12 16:39:11 +08:00
3b35c89958 util/ranger: fix explain does not display range[NULL, NULL] (#19028) (#19068) 2020-08-11 17:23:01 +08:00
f172a1e08a planner: make some access paths check fit the clustered index (#18998)
* planner: make some access paths check fit the clustered index

* add test

* add test for outer join elimination

* make test stable

* fix test

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-08-10 15:33:17 +08:00
3df573d2fc planner,executor: use new table partition implementation and fix CI (#18981) 2020-08-06 17:50:40 +08:00
e49b4c0322 planner: support out join in broadcast join (#18988)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
Co-authored-by: Zhuomin(Charming) Liu <lzmhhh123@gmail.com>
2020-08-06 13:24:17 +08:00
aeee1524e4 planner: fix the inappropriate heuristic rule to estimate the EQ selectivity when out of range (#18543) 2020-08-05 14:11:06 +08:00
4e829aaee7 planner,executor: fix index merge for partition table (#18940)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-08-04 20:38:17 +08:00
950ca5062c plan: optimize the performance of decodePlan for big union query (#18891) 2020-08-03 14:17:36 +08:00
5dd7cd8553 planner/core: implement Explain for the new partition table (#18834)
Co-authored-by: lysu <sulifx@gmail.com>
2020-07-30 15:37:02 +08:00
56fd348d20 executor: support index merge on cluster index (#18699)
* executor: support index merge on cluster index

* fix fmt

* fix

* fix

* fix

* fix

* address comments

* address comments

* address comments

* fix

* fix

* fix

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-07-27 18:09:32 +08:00
f3554241bb planner, executor: support except and intersect set operator (#18459)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-07-27 17:56:07 +08:00
29178dfa8d planner, executor: support broadcast join for tiflash engine. (#17232)
* support batch cop for tiflash

* support batch cop

* support join push down to tiflash

* refine

* change pb

* push join

* fix

* add hint

* refine hint

* add ranges

* fix

* fix

* fix push down

* fix index

* enable distsql for join

* add a session var to disable/enable broadcast join

* fix bug

* fix bug

* tiny fix

* enable cast decimal pushdown to tiflash

* fix

* fix bc join bug

* make broadcast plan stable

* refine code

* fix bug

* basic support for multi table broadcast join

* fix bug

* basic cbo for broadcast join

* improve

* fix bug

* remote useless code

* add tests

* pass unit tests

* refine code

* support execute summary info for broadcast join

* fix bug in explain for broadcast join

* format code

* remove un-needed code

* fix make dev

* address comments

* Hanfei/join merge (#7)

* enable exec details for batch cop

* format code

* fix test

* change tidb_opt_broadcast_join to global vars

* Ban cartesian join to be pushed down to TiFlash (#8)

* merge master (#10)

* merge master

* fix bug

* fix bug

* fix ut

* check session var conflict

* Add perfer local hint for broadcast join (#12)

* update

* remove useless code

* remove useless code

* update parser

* add test for prefer local join

* use bcj_local

* update go.mod

* refine planner

* refine comments

* fix make dev

* fix make dev

* update parser

* address comments

* fix make dev

* disable broadcast join when new collation is enabled

* Update planner/core/exhaust_physical_plans.go

Co-authored-by: Zhuomin(Charming) Liu <lzmhhh123@gmail.com>

* address comments

* fix

* address comments

* fix tests

* address comments

Co-authored-by: xufei <xufeixw@mail.ustc.edu.cn>
Co-authored-by: xufei <xufei@pingcap.com>
Co-authored-by: 虎 <ichneumon.hu@foxmail.com>
Co-authored-by: Zhuomin(Charming) Liu <lzmhhh123@gmail.com>
2020-07-27 12:41:36 +08:00
ace80c7411 planner: apply min-max eliminator on common handle columns (#18589)
* planner: apply min-max eliminator on common handle columns

* reuse AccessPath.IsTablePath()

* planner: apply min-max eliminator on common handle columns

* address comments

* address comment

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-07-17 18:01:47 +08:00
79143d6fa1 planner: support keep order for clustered index (#18590) 2020-07-16 12:01:06 +08:00
af129d2116 planner: reset plan ID count when using nth_plan hint (#18409) 2020-07-10 09:46:34 +08:00
658132fcf3 planner: refactor handle columns (#18391) 2020-07-07 12:26:14 +08:00
daad2699dd *: support clustered index for index join (#18204) 2020-07-01 16:15:51 +08:00