Commit Graph

161 Commits

Author SHA1 Message Date
xhe
07d0b2d845 planner: forbid prepared stale select in txn (#25375) 2021-06-15 14:30:37 +08:00
xhe
9189ec66ac *: stale reads compatible with prepare (#25156) 2021-06-11 19:32:35 +08:00
2e083b40e5 statistics: support indexes containing virtual column for full sampling (#24999) 2021-06-04 16:18:28 +08:00
02b4f3bcc8 executor: add more cases about dynamic-mode with plan-cache and transaction (#24998) 2021-06-01 11:23:36 +08:00
a80047c604 CTE: support explain CTE plan (#24986) 2021-05-31 19:03:36 +08:00
f3557bb591 planner, executor: supports select statement with AS OF (#24613) 2021-05-27 21:11:35 +08:00
f9c5894275 planner: cleanup point update cache logic (#24755) 2021-05-26 11:33:34 +08:00
98f0d76bc7 *: clean up the deserted syntax of START TRANSACTION READ ONLY (#24813) 2021-05-25 14:25:33 +08:00
6bfc5f8b44 *: support AS OF TIMESTAMP read-only begin statement (#24740) 2021-05-20 20:54:22 +08:00
18d519f056 stats, executor: use a correct sampling to collect stats (#23997) 2021-05-02 23:11:51 +08:00
7d5fe41470 planner: support explain verbose mode (#23926) 2021-04-15 18:23:53 +08:00
961cd66393 executor,planner: fix update join update unmatched outer row (#23491) 2021-03-26 19:43:23 +08:00
9f465d788e planner: incorrect results returned when executing a prepared point-get update meets nondeterministic function. (#22067) (#23455) 2021-03-22 19:57:37 +08:00
92b1b8e0e9 planner: check schema stale for plan cache when forUpdateRead (#22381) 2021-03-19 17:25:36 +08:00
1ac53c546d planner: fix wrong PointGet / TableDual plan reused in plan cache (#23238) 2021-03-17 16:52:55 +08:00
2890a8f62c executor: fix get var expr when session var is hex literal (#23241) 2021-03-17 15:02:55 +08:00
587010f8e2 planner: fix prepared execute panic when sql without clustered pk condition (#23185) 2021-03-10 19:10:29 +08:00
b3d4458b28 planner: refine explain info for batch cop (#20360) 2021-03-08 15:30:54 +08:00
ae50555f8a planner: fix linter --enable=deadcode check error (#23117) 2021-03-08 11:34:54 +08:00
8230f4162b *: optimize analyze cluster index table (#21381) 2021-03-01 22:14:54 +08:00
35534ae752 *: apply golangci-lint to the new code (#22824) 2021-02-24 18:24:03 +08:00
04e5137f48 *: use explain format = 'brief' for tests (#22677) 2021-02-22 17:50:06 +08:00
2d717c12b3 statistics: merge the partition-level stats to global-level stats (#22667) 2021-02-05 11:42:41 +08:00
343c412531 planner, executor, statistics: add tests for version 2 and fix bugs (#22461)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-02-04 15:52:30 +08:00
44641c3282 planner: change the content of AnalyzeTableID to build global-stats (#22554) 2021-02-02 15:39:44 +08:00
e3108df576 planner: do not cache prepared plan if optimization depends on mutable constant (#22349) 2021-01-12 11:11:59 +08:00
c7165bc518 executor, planner: ON DUPLICATE UPDATE can refer to un-project col (#14412)
Co-authored-by: Kenan Yao <cauchy1992@gmail.com>
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-01-06 19:03:51 +08:00
5e67a597cc planner, store/tikv, executor:Support shuffled hash join and refine codes (#20894) 2020-12-28 15:14:15 +08:00
39d8fcc71b executor: fix value swapping and multi-updates in UPDATE statement (#20493) 2020-12-10 15:48:02 +08:00
32d19b78e1 *: refine runtime stats display and tiny bug fix for metrics (#21022)
Signed-off-by: crazycs520 <crazycs520@gmail.com>
2020-11-26 16:35:25 +08:00
de75e604ff *: differentiate types for user variables (#18973)
Co-authored-by: lzmhhh123 <lzmhhh123@gmail.com>
2020-11-17 17:03:41 +08:00
269494e3de *: Move sysvar validation to struct (3 of 3) (#20521) 2020-11-12 13:22:42 +08:00
a2e1aff6e5 *:Fix the bug of consistent plan but inconsistent plan digest (#20660) 2020-11-02 19:36:55 +08:00
272f964031 executor: support global kill (#17649) 2020-10-27 19:39:20 +08:00
58f2a48b11 *:add the indexlookup runtime stats infomation (#20145) 2020-10-23 19:33:15 +08:00
17b7b5e815 *: add executor runtime info for explain for connection statement (#19183) 2020-09-27 20:44:11 +08:00
2836011470 executor, planner: refactor analyze tableID to analyzeTableID & add CanRuntimePrune (#19846)
* executor, planner:  refactor analyze tableID to analyzeTableID

* *: add util to help decide whether use new runtime prune partition executor

* address comments

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-09-08 23:49:39 +08:00
48388a7b48 planner,executor: enable plan cache for partition table (#19124)
* planner,executor: enable plan cache for partition table

* address comment

* tiny clean up

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
Co-authored-by: lysu <sulifx@gmail.com>
2020-09-08 19:40:39 +08:00
349adf85e0 table: use evalBuffer to improve performance of locatePartition (#18818)
* optimize hash and range partition insert

* add eval buffer for partition

* fix make dev

* go fmt

* format import

* fix ci test

* use pool to avoid race

* use pointer

* add some test

* fix range partition bug

* add multi table test case

* fix test case fail

* fix mysql test case

* fix mysql test case

* add addition column for handle

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-09-01 14:49:02 +08:00
75ebe66a0b planner: fix IsPointGetWithPKOrUniqueKeyByAutoCommit for clustered index (#19255) 2020-08-20 13:30:04 +08:00
a2e2ce6339 *: use int instead of fmt.Stringer as executor id (#19207) 2020-08-19 13:39:31 +08:00
ea3da25984 *: record more rpc runtime information in cop runtime stats (#18916) 2020-08-18 16:34:07 +08:00
07ae6078e8 *: support clustered index for fast analyze (#18767) 2020-08-07 19:22:14 +08:00
5f393fde7e *: support user defined variable and SET clause in LOAD DATA statement (#18753) 2020-08-03 10:42:10 +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
ac581ee01e planner: support plan cache for cluster index (#18716) 2020-07-28 14:39:48 +08:00
5f2df2eca8 executor: modify the default value of actRows to be 0 instead of empty(#18528) (#18800) 2020-07-27 17:37:36 +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
3b63270909 telemetry: Add telemetry initial implementation (#18180)
Signed-off-by: Breezewish <me@breeswish.org>

Co-authored-by: crazycs <crazycs520@gmail.com>
Co-authored-by: Lynn <zimu_xia@126.com>
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-06-24 14:41:46 +08:00
63c0ef8e5d planner: save explain result of plan in session for `explai ... (#17687) 2020-06-19 14:07:53 +08:00