Commit Graph

153 Commits

Author SHA1 Message Date
48fce5e15c *: sync wait stats loading for stable plan (#30026) 2021-12-31 10:35:50 +08:00
daf525a17e *: replace compareDatum by compare, range part (#30710) 2021-12-16 19:48:36 +08:00
2f42f7c0f6 planner: unify the argument of stats functions to use SessionCtx instead of StatementContext (#30668) 2021-12-14 19:36:35 +08:00
4051cf435c statistics: replace compareDatum by compare (#30052) 2021-11-23 19:21:50 +08:00
xhe
94e30df8e2 parser: fix compiling, add unit tests (#28700) 2021-10-11 23:15:25 +08:00
c6de069d61 sessionctx, statistics: remove unused StatementContext.mu.histogramsNotLoad (#27928) 2021-09-16 11:30:42 +08:00
7755d25aba *: Integrate SkyWalking-eyes to check license headers in CI and fix licenses headers (#27198) 2021-08-16 18:52:00 +08:00
cb65b7a2f7 statistics: improve out-of-range estimation strategy (#26502) 2021-08-02 17:43:08 +08:00
0974cb415b statistics: not to convert small range into points when estimate rowcount using v2 stats (#26695) 2021-07-28 18:58:18 +08:00
11716e7f4a *: use full sampling as default analyze (#25132) 2021-06-06 00:34:27 +08:00
32cf14bd7d statistics: relax the check of the OutOfRange (#24958) 2021-06-02 22:16:25 +08:00
9b5d92ef24 statistics: fix the unexpected estimation error on full sampling (#24623) 2021-05-26 18:47:34 +08:00
66ad36ee10 planner, executor, statistics: support correlation calc for new sampling method (#24458) 2021-05-25 23:57:34 +08:00
18d519f056 stats, executor: use a correct sampling to collect stats (#23997) 2021-05-02 23:11:51 +08:00
6b0b74e5be statistics: fix three bugs about MergePartTopN2GlobalTopN (#24370) 2021-04-29 19:31:57 +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
dbd31ad044 statistics: make the global-level topN more accurate (#23862) 2021-04-12 12:06:34 +08:00
490c9386fb statistics: optimize the global histogram merging algorithm (#23520) 2021-03-26 15:40:59 +08:00
396760174c statistics: recalculate bucket repeats when merging global statistics (#23486) 2021-03-24 11:47:36 +08:00
31df40b9bc statistics: add some test cases of global-stats to cover more column types (#23138) 2021-03-08 14:10:54 +08:00
a1712a037f statistics: add more test cases about global-stats and fix some issues (#23099) 2021-03-05 14:34:31 +08:00
263155a650 statistics: make exponential backoff estimation more safe (#23086) 2021-03-04 11:10:54 +08:00
b63337f4e9 statistics: fix merge idx hist with poped topn (#23075) 2021-03-03 18:36:06 +08:00
a64d8860f1 statistics: forbid global-stats in stats-ver1 and make analyze options take effect in global-stats (#23050) 2021-03-03 11:58:54 +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
1cd390b2bc statistics: merge poped topn when generating the global histogram (#22848) 2021-02-22 14:34:53 +08:00
59ccb29508 statistics: merge the partition-level histograms to a global-level histogram (#22603) 2021-02-19 11:08:04 +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
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
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
28c9e9290b *: gocritic fixes for commentFormatting (#21578) 2020-12-09 12:03:17 +08:00
5131514ebb statistics: fix a bug which causes panic when using the clustered index and the new collation (#21379)
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
2020-12-01 14:08:41 +08:00
0cddd8b7fb statistics: fix the panic when analyze with collation enabled (#21262) 2020-11-25 20:10:20 +08:00
583cbd265b statistics: store the topn by slice instead of map (#20818) 2020-11-06 15:39:33 +08:00
c2e3b0a6ad statistics: decouple TopN from CMSKetch (#20572) 2020-10-28 15:16:42 +08:00
cd16de894b *: introduce LRUCache with limited memory for statistics (#18788) 2020-10-15 17:36:21 +08:00
3903c6b8b5 statistics: fix the display of bounds for indexes with date/time columns. (#19961) 2020-09-17 19:01:26 +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
ceec9d9c63 *: fix the estimation error on normal column when collation enabled (#18104) 2020-07-01 17:11:51 +08:00
06e73a56cc *: compatible with Go 1.14's checkptr (#18189) 2020-06-24 13:04:47 +08:00
a7bdb82402 *: Reduce memory operations by simply passing size hint to make (#14922) 2020-02-25 15:44:36 +08:00
510c36d4cb planner: fix a bug for chunk cost model. (#14144) 2019-12-22 09:15:16 +08:00
02408dbd04 planner: support cost model for Chunk encode format. (#13461) 2019-12-18 15:47:16 +08:00
5a589c9994 planner: consider disk cost in hashJoin (#13246) 2019-12-03 13:43:19 +08:00
b0e8e0764d *: fix staticcheck errors in folder statistics (#13776) 2019-11-28 12:31:21 +08:00
5069939d74 stats: specially handle unqiue key when estimate (#13354) 2019-11-11 17:52:30 +08:00