Commit Graph

122 Commits

Author SHA1 Message Date
32cf14bd7d statistics: relax the check of the OutOfRange (#24958) 2021-06-02 22:16:25 +08:00
734084fa2b statistics: skip reading mysql.stats_histograms if cached stats is up-to-date (#24175) 2021-04-22 17:37:54 +08:00
bd12ea96cc statistics: use index fm-sketches instead of bucket NDV to calculate global NDV for indexes (#23962) 2021-04-15 14:59:55 +08:00
550ca8eaeb statistics: enables global-level stats to be generated in fast analyze mode (#22931) 2021-03-01 16:40:50 +08:00
270d497848 statistics: introduce new estimation logic when index histogram fails to estimate (#22682)
* statistics: introduce new estimation logic when index histogram fail to estimate

* address comments

* address comments

Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
2021-02-24 16:30:03 +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
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
f22ec62dd0 statistics: fix panic occurs when stats cache inconsistency (#22465) 2021-01-27 16:41:07 +08:00
8d2ab4ef7a statistics: fix inaccurate row count estimation caused by cross validation using invalid column stats (#22479) 2021-01-22 17:42:37 +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
76054200b6 statistics: redesign the schema for mysql.stats_extended (#22033)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2021-01-04 17:57:24 +08:00
092a01a0a4 statistics, executor: refactor statistics on columns (#21817) 2020-12-24 13:56:30 +08:00
5acff8de7a *: Revert "#19008" and "#18788" (#21599) 2020-12-14 15:06:35 +08:00
b4eee287af *: extract topn out of histogram correctly (#21007)
Co-authored-by: Yuanjia Zhang <zhangyuanjia@pingcap.com>
2020-12-10 17:05:39 +08:00
152b60ebe4 session: increase cm_sketch column max length to 6291456(6MB) (#20152) 2020-11-02 15:21:25 +08:00
c2e3b0a6ad statistics: decouple TopN from CMSKetch (#20572) 2020-10-28 15:16:42 +08:00
f41880a4d0 statistics: improve row count estimation of multi-column equal conditions by cross validation (#20264) 2020-10-27 20:10:27 +08:00
cd16de894b *: introduce LRUCache with limited memory for statistics (#18788) 2020-10-15 17:36:21 +08:00
c5c7bf87bb *: support CREATE / DROP / ADMIN RELOAD STATISTICS (#18880) 2020-08-11 17:27:48 +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
beaafce2a5 statistics:enable memtracker for table statisitic (#18685) 2020-07-23 16:13:34 +08:00
94a722e2df statistics: improve estimation for index equal condition (#17366) 2020-06-03 08:32:17 +08:00
a7bdb82402 *: Reduce memory operations by simply passing size hint to make (#14922) 2020-02-25 15:44:36 +08:00
1d60894c96 ddl: add index progress metric (#14055) 2019-12-20 21:50:43 +08:00
02408dbd04 planner: support cost model for Chunk encode format. (#13461) 2019-12-18 15:47:16 +08:00
438d39ebcd *: revert #10124 and remove sql mode PadCharToFullLength (#14007) 2019-12-17 15:25:06 +08:00
2c6f4468a0 statistics: fix row count estimation of unique composite index (#14076) 2019-12-16 19:05:13 +08:00
5a589c9994 planner: consider disk cost in hashJoin (#13246) 2019-12-03 13:43:19 +08:00
5069939d74 stats: specially handle unqiue key when estimate (#13354) 2019-11-11 17:52:30 +08:00
6fd74f3e4c planner: support cost model for tiflash table scan (#12868) 2019-10-29 16:05:51 +08:00
6d51ad33fd *: Optimize struct memory usage by adjust field order (#11629) 2019-08-13 17:20:53 +08:00
d51a3e067e planner: use HistColl containing all columns for row width estimation (#11689) 2019-08-09 17:00:33 +08:00
fe038642e5 *: refactor cost model formulas and constants (#10581) 2019-08-07 17:44:09 +08:00
03bb8d7818 stats: convert small range to points in selectivity (#11524) 2019-08-05 10:45:51 +08:00
bd419c8fdb stats: fix panic when dump pseudo columns (#11430) 2019-07-26 14:43:20 +08:00
89bfed305c executor, stats: fix fast analyze bugs (#10680) 2019-06-04 12:32:41 +08:00
69b02a3736 *: make config items Performance.*, OOMAction and MemQuotaQuery support hot-reloading (#10295) 2019-04-29 16:38:46 +08:00
e5f734e54c *: move the Handle of stats to single package. (#10149) 2019-04-17 13:42:34 +08:00
7666f688b3 *: add stats version in slow_query and slow log. (#10082) 2019-04-15 18:04:48 +08:00
2e14068ee1 *: improve NULL count estimation for single column index (#9474) 2019-03-30 19:22:30 +08:00
451f54e25e statistics: unify log format in package statistics (#9534) 2019-03-18 16:59:56 +08:00
c5c30912db statistics: set correlation when loading needed column histogram (#9701) 2019-03-14 16:28:53 +08:00
c0ca027f51 stats: fix data race when updating correlation (#9594) 2019-03-09 14:47:00 +08:00
69f2749154 executor: only show valid columns in stats_histogram (#9487) 2019-02-28 13:06:38 +08:00
45f9d6a00f statistics: compute and store column order correlation with handle (#9315) 2019-02-27 11:32:00 +08:00
46ead360cc statistics: add PhysicalID to Column (#9394) 2019-02-22 17:30:31 +08:00
ec833bc4d2 *: fix some lints produced by golangci-lint (#8999) 2019-01-16 16:44:49 +08:00
82d2726300 planner, statistics: build new histogram using range information (#7921) 2019-01-14 20:33:36 +08:00
8be09da457 stats: fix panic when dumping stats (#8448) 2018-11-26 21:08:02 +08:00