Commit Graph

1252 Commits

Author SHA1 Message Date
8230f4162b *: optimize analyze cluster index table (#21381) 2021-03-01 22:14:54 +08:00
550ca8eaeb statistics: enables global-level stats to be generated in fast analyze mode (#22931) 2021-03-01 16:40:50 +08:00
6bd6df7d1e planner: let tikv know primary prefix columns info (#22829) 2021-03-01 16:20:54 +08:00
bc37f088ba *: fix some varcheck lint warnings (#23011) 2021-03-01 15:10:54 +08:00
e1004a2ccb *: modify the switch to control global stats (#22866) 2021-03-01 14:18:30 +08:00
4b90ef471c planner: include "CREATE/DROP TEMPORARY TABLE" to noop functions (##609) (#22860)
* planner: include "CREATE/DROP TEMPORARY TABLE" to noop functions (##609)

TiDB ignores the TEMPORARY keyword in "CREATE/DROP TEMPORARY TABLE" statements.
Report errors when and only when tidb_enable_noop_functions = OFF.

* Add link to pingcap/parser issue

Co-authored-by: bb7133 <bb7133@gmail.com>

Co-authored-by: bb7133 <bb7133@gmail.com>
Co-authored-by: Morgan Tocker <tocker@gmail.com>
2021-02-27 23:31:06 -07:00
8357f809ff *: remove some useless codes and do tiny update (#22972) 2021-02-26 19:14:53 +08:00
d8c5ca34ed planner/core: skip clustered index during admin check table (#22871) 2021-02-26 17:14:53 +08:00
8a490e96b5 parser: quote identifier with backquote when getting SQL digest (#22893) 2021-02-26 14:54:54 +08:00
df01fcc1ff planner, executor: reset NotNullFlag when merge schema for join (#22955) 2021-02-25 23:17:55 +08:00
7151b4f3b5 config: use tidb_enable_list_partition to enable list table partition feature (#22864) 2021-02-25 22:11:04 +08:00
806097c2e5 planner: fix wrong index merge selection (#22825) 2021-02-24 20:18:03 +08:00
35534ae752 *: apply golangci-lint to the new code (#22824) 2021-02-24 18:24:03 +08:00
2d48f9573c planner: decorrelate LogicalApply with inner join as the inner child (#22649) 2021-02-24 15:42:03 +08:00
df9e730c16 stats, planner, sessionctx: handle compatibility between feedback and ver2 stats (#22846)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
Co-authored-by: Yiding Cui <winoros@gmail.com>
Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
2021-02-23 13:46:49 +08:00
001b34ea8d server, sessionctx: Support for the status command of MySQL Shell (#22752)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
Co-authored-by: Morgan Tocker <tocker@gmail.com>
2021-02-23 12:56:48 +08:00
f3fe4895cb statistics: support to store FMSketch and add FMSketch to column stats (#22841)
* add FMSketch to mysql.stats_histograms

* statistics: support store FMSketch and add FMSketch to histogram

* FIX UT

* Create Stats_FM_Sketch Table

* fix UT

* add some tests

* FIX ut

* move fmSketch from histogram to column.stats

* remove unused code and comments

* fix ut

* fix ut

* fix ut

* fix ut

* fix ut

* fix ut

* finish the FMSketch.MemoryUsage function

* add some comments for FMSketch.MemoryUsage function

* fix typo

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
2021-02-23 10:39:09 +08:00
04e5137f48 *: use explain format = 'brief' for tests (#22677) 2021-02-22 17:50:06 +08:00
78debe76ef planner: fix where condition index out of range (#22833) 2021-02-22 11:06:17 +08:00
461cae15a7 planner, distsql: fix the behaviour of building ranges for TiFlash (#22725) 2021-02-21 18:29:46 +08:00
8184e69eb7 planner,cascade: remove useless codes (#22770) 2021-02-20 14:17:16 +08:00
3ad7f40140 expression: Add warning info for exprs that can not be pushed to storage layer (#22713) 2021-02-20 10:41:57 +08:00
27db39b480 *: use CLUSTERED and NONCLUSTERED to control primary key type (#22409) 2021-02-05 20:41:41 +08:00
2d717c12b3 statistics: merge the partition-level stats to global-level stats (#22667) 2021-02-05 11:42:41 +08:00
6d53dda29d plan, mpp: refine the precision of avg(decimal) & avg(null) for mpp (#22668) 2021-02-04 18:58:15 +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
17b88defa4 executor: fix invalid txn when using prepare under @@tidb_snapshot (#22697)
Signed-off-by: lysu <sulifx@gmail.com>
2021-02-03 18:14:58 +08:00
44641c3282 planner: change the content of AnalyzeTableID to build global-stats (#22554) 2021-02-02 15:39:44 +08:00
ee876397ac unistore/cophandler: change the logic of mpp execution in unit test. (#22428) 2021-02-01 19:06:42 +08:00
843e03996b *: do not report error for prepared stmt execution if tidb_snapshot is set (#22568) 2021-02-01 14:44:17 +08:00
7b79af93d7 planner: fix in-compatibility issues between TiDB agg and TiFlash agg in MPP mode (#22537) 2021-01-27 16:03:32 +08:00
0aa476034a go.mod, statistics, planner: replace TIDB_STATS with STATS_EXTENDED (#22492) 2021-01-25 21:18:07 +08:00
5e3fbebf7d planner: avoid potential panic when generating hints from joins (#22515) 2021-01-25 17:21:07 +08:00
e2540d4ec0 planner: Shuffle hash agg (#21842) 2021-01-22 11:49:30 +08:00
dd5bfc3949 planner: reorder inner joins simplified from outer joins (#22392) 2021-01-15 11:57:29 +08:00
d0ca720a5f *: support ALTER TABLE ADD / DROP TIDB_STATS (#22127) 2021-01-14 15:28:28 +08:00
3dd842f50a statistics: add bucket ndv for index histogram (#20580)
Co-authored-by: Yuanjia Zhang <zhangyuanjia@pingcap.com>
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-01-13 18:24:21 +08:00
4088c2011b planner: check index valid while forUpdateRead (#22152)
Signed-off-by: you06 <you1474600@gmail.com>
2021-01-12 15:09:59 +08:00
e3108df576 planner: do not cache prepared plan if optimization depends on mutable constant (#22349) 2021-01-12 11:11:59 +08:00
dae6e4935b planner/core: push selection operator to mpp task (#22343) 2021-01-11 17:51:58 +08:00
e234403616 planner: fix panic in extractSelectAndNormalizeDigest (#22333) 2021-01-11 15:43:10 +08:00
809a375f5c planner: fix wrong sql run success if condition alwasy false (#22300) 2021-01-11 14:07:28 +08:00
e393b1b97c planner: check error when correlatedAggregateResolver leaves ast.Node (#22222) 2021-01-11 11:11:27 +08:00
c2ee8d37c2 *: bump tidb's parser to the latest version (#22218)
Signed-off-by: iosmanthus <myosmanthustree@gmail.com>
2021-01-08 17:58:58 +08:00
caa8c16cac execution: support explain analyze in mpp execution. (#22053) 2021-01-07 17:46:59 +08:00
6e98d18e94 planner: push down projection for tiflash (#21459) 2021-01-07 11:41:44 +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
51794e9d30 *: rewrite origin SQL with default DB for SQL bindings (#21275) 2021-01-06 16:28:29 +08:00
4bfd10cec8 planner: do not use indexMerge when the path only use a single index (#22168) 2021-01-05 20:44:41 +08:00
6742ed201d planner/core: fix a bug of adding enforcer. (#22086) 2021-01-05 17:01:39 +08:00