Commit Graph

689 Commits

Author SHA1 Message Date
19b85656d8 *: use generics to improve Clamp (#34586)
close pingcap/tidb#34588
2022-05-13 17:28:35 +08:00
5b6bb13672 statistics: avoid unnecessary read of mysql.stats_fm_sketch (#34580)
close pingcap/tidb#34581
2022-05-13 17:12:36 +08:00
5ca242761c executor: add test cover Analyze task for evicted index (#34622)
ref pingcap/tidb#34052
2022-05-13 14:46:35 +08:00
ea4fda51aa statistics: add metrics for statscache lru (#34568)
ref pingcap/tidb#34052
2022-05-11 17:26:35 +08:00
218247e80e *: improve stack message in the panic log (#34564)
close pingcap/tidb#34356
2022-05-11 16:34:34 +08:00
a58e519055 *: change mysql.analyze_jobs.instance column type (#34542)
close pingcap/tidb#34543
2022-05-11 11:14:34 +08:00
53f228af45 sysvari: enable statsCache lru by config (#34278)
* add statsquota variable

Signed-off-by: yisaer <disxiaofei@163.com>

* add test

Signed-off-by: yisaer <disxiaofei@163.com>

* address the comment

Signed-off-by: yisaer <disxiaofei@163.com>

* address the comment

Signed-off-by: yisaer <disxiaofei@163.com>

* address the comment

Signed-off-by: yisaer <disxiaofei@163.com>

* fix conflict

Signed-off-by: yisaer <disxiaofei@163.com>

* address the comment

Signed-off-by: yisaer <disxiaofei@163.com>

address the comment

Signed-off-by: yisaer <disxiaofei@163.com>

fix duplicated plan

Signed-off-by: yisaer <disxiaofei@163.com>

fix duplicated plan

Signed-off-by: yisaer <disxiaofei@163.com>

fix duplicated plan

Signed-off-by: yisaer <disxiaofei@163.com>

* fix duplicated plan

Signed-off-by: yisaer <disxiaofei@163.com>

* fix duplicated plan

Signed-off-by: yisaer <disxiaofei@163.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
2022-05-10 23:49:54 +08:00
33236ba8d7 *: track analyze memory usage separately with quota (#33054)
ref pingcap/tidb#29938, close pingcap/tidb#33065
2022-05-10 20:32:35 +08:00
8a2966ce1e *: improve map copy (#34451)
close pingcap/tidb#34454
2022-05-09 11:44:33 +08:00
0f0a2ca774 statistics: add lru cache implement for statsCacheInner (#34323)
ref pingcap/tidb#34052
2022-05-06 16:22:56 +08:00
f88dab92f9 util: use generics to implement max/min (#34197)
close pingcap/tidb#34247
2022-05-06 10:08:57 +08:00
42089cd9e3 statistics: separte Get/Put according to query for statsCacheInner (#34211)
ref pingcap/tidb#34052
2022-04-28 18:04:52 +08:00
6bd54bea8a statistics: improve topn pruning logic (#34282)
ref pingcap/tidb#32758, close pingcap/tidb#34256
2022-04-27 20:26:51 +08:00
e1580175e7 statistics: fix init topn not sorted (#34234)
ref pingcap/tidb#32758, close pingcap/tidb#34216
2022-04-26 23:32:51 +08:00
ad2ce1de83 statistics: DumpIndexUsageToKV use batch insert to reduce cost (#33981)
close pingcap/tidb#33980
2022-04-26 22:44:51 +08:00
0c17a9acda statistics: make order random when looking for need-analyze table (#34196)
ref pingcap/tidb#34207
2022-04-26 19:44:51 +08:00
1bf64c60f4 *: Refactor FieldType structure (#33569)
close pingcap/tidb#32116
2022-04-26 19:28:51 +08:00
5ba2adb5cb planner: fix the unstable test TestAnalyzeGlobalStatsWithOpts 2022-04-21 17:06:00 +08:00
a5033d14d0 *: use global auto analyze ID in order to kill auto analyze globally (#34075)
close pingcap/tidb#34076
2022-04-20 17:58:03 +08:00
ebdc78463a statistics: introduce cache interface for statsCache (#34061)
* fix

Signed-off-by: yisaer <disxiaofei@163.com>

* fix

Signed-off-by: yisaer <disxiaofei@163.com>

* fix

Signed-off-by: yisaer <disxiaofei@163.com>

* fix test

Signed-off-by: yisaer <disxiaofei@163.com>

* fix test

Signed-off-by: yisaer <disxiaofei@163.com>

* fix test

Signed-off-by: yisaer <disxiaofei@163.com>

* support forward dumpfile request

Signed-off-by: yisaer <disxiaofei@163.com>

add log

Signed-off-by: yisaer <disxiaofei@163.com>

add log

Signed-off-by: yisaer <disxiaofei@163.com>

add log

Signed-off-by: yisaer <disxiaofei@163.com>

add log

Signed-off-by: yisaer <disxiaofei@163.com>

fix get topo

Signed-off-by: yisaer <disxiaofei@163.com>

revise log

Signed-off-by: yisaer <disxiaofei@163.com>

fix lint

Signed-off-by: yisaer <disxiaofei@163.com>

fix lint

Signed-off-by: yisaer <disxiaofei@163.com>

fix lint

Signed-off-by: yisaer <disxiaofei@163.com>

revise handle error

Signed-off-by: yisaer <disxiaofei@163.com>

revise handle error

Signed-off-by: yisaer <disxiaofei@163.com>

* fix lint

Signed-off-by: yisaer <disxiaofei@163.com>

* fix lint

Signed-off-by: yisaer <disxiaofei@163.com>

* fix lint

Signed-off-by: yisaer <disxiaofei@163.com>

* remove limit

Signed-off-by: yisaer <disxiaofei@163.com>

* introduce interface

Signed-off-by: yisaer <disxiaofei@163.com>

* introduce tableMemUsage

Signed-off-by: yisaer <disxiaofei@163.com>

* add comments

Signed-off-by: yisaer <disxiaofei@163.com>

* add comments

Signed-off-by: yisaer <disxiaofei@163.com>

* address the comment

Signed-off-by: yisaer <disxiaofei@163.com>

* address the comment

Signed-off-by: yisaer <disxiaofei@163.com>

* address the comment

Signed-off-by: yisaer <disxiaofei@163.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
2022-04-20 15:06:59 +08:00
9c836a5ddf session, statistics, util: fix data race of Handle.mu.ctx (#33732)
ref pingcap/tidb#32822, close pingcap/tidb#32867, ref pingcap/tidb#33001
2022-04-13 15:36:36 +08:00
9d44656564 domain: use util.WaitGroupWrapper insteal of sync.WaitGroup (#33637)
ref pingcap/tidb#31716
2022-04-01 23:48:29 +08:00
0f4706418e *: track cluster-level analyze jobs and make it persistent (#32215)
close pingcap/tidb#32403
2022-03-31 21:06:29 +08:00
c671ebc88b statistics: fix wrong point range in crossValidationSelectivity (#33357)
ref pingcap/tidb#28030
2022-03-28 10:52:27 +08:00
9b9051f113 statistics: fix data race in HandleUpdateStats (#33260)
ref pingcap/tidb#32867, ref pingcap/tidb#33001, close pingcap/tidb#33108
2022-03-25 15:02:33 +08:00
768ce5fbde statistics: allow using not-loaded stats when ndv is 0 (#33241)
ref pingcap/tidb#32758, close pingcap/tidb#33280
2022-03-22 17:08:33 +08:00
6b2e37f18c gomod: update dependency for golang1.18 (#33053)
ref pingcap/tidb#32874
2022-03-17 15:10:31 +08:00
47e4b5bf31 *: revert #27021 to fix a bug that selection can not be pushed down when having clause above aggregation (#33168)
close pingcap/tidb#33166
2022-03-17 10:43:53 +08:00
128dc16820 statistics: fix load stat for new collation column (#33146)
close pingcap/tidb#31765
2022-03-16 17:29:53 +08:00
c11e650527 *: make golangci-lint work on Go1.18 (#33081)
close pingcap/tidb#33080
2022-03-15 22:43:52 +08:00
824f43408f statistics: add a more accurate upper bound to exponential backoff estimation strategy (#32848)
ref pingcap/tidb#22589, ref pingcap/tidb#32758
2022-03-14 17:21:51 +08:00
9fcc6b090b statistics: correctly check if a column histogram is loaded (#32764)
close pingcap/tidb#31925, ref pingcap/tidb#32758, close pingcap/tidb#32833
2022-03-13 15:51:50 +08:00
62b2e5cdd6 statistics: skip impossible values when estimating row count (#32762)
ref pingcap/tidb#32758, close pingcap/tidb#32834
2022-03-10 16:37:50 +08:00
62e20780e8 *: kill auto analyze (#31724)
close pingcap/tidb#32808
2022-03-07 13:49:48 +08:00
7cf784cf26 statistics: handle contants in Selectivity() (#32761)
ref pingcap/tidb#32758, close pingcap/tidb#32835
2022-03-06 23:41:48 +08:00
c9a7e7d4bc statistics: refactor code structure for histogram buckets and clamping row counts (#32760)
ref pingcap/tidb#32758
2022-03-04 19:07:47 +08:00
fc6b939ecc planner: introduce historical meta stats auto-dump (#32041)
ref pingcap/tidb#18745
2022-03-03 19:05:47 +08:00
09324adc13 handle_test: fix unstable test in the TestConcurrentLoadHistTimeout (#32622)
close pingcap/tidb#32580
2022-02-25 16:47:43 +08:00
5988d0b2f4 *: update client-go and etcd version (#32457)
close pingcap/tidb#32456
2022-02-22 11:11:43 +08:00
c102b6b25a statistics: fix data race (#32448)
close pingcap/tidb#32426
2022-02-18 16:07:40 +08:00
4548f12b1c *: clean sqlexec in statistics handle (#32282)
close pingcap/tidb#32238
2022-02-16 16:55:39 +08:00
2f0c23da24 executor: migrate test-infra to testify for stale_txn_test (#32285)
close pingcap/tidb#28618
2022-02-14 16:49:38 +08:00
10a721a4f7 statistics: remove the deltaMap when dump to stats_histograms fail (#32300)
close pingcap/tidb#32299
2022-02-14 16:07:38 +08:00
7c56706622 *: support predeclared golangci-lint linter (#32066)
close pingcap/tidb#30733
2022-02-14 10:35:38 +08:00
30cd559fa9 *: refactor sqlexec to support using current session (#32229)
close pingcap/tidb#32233
2022-02-10 18:09:36 +08:00
3738dec53e *: enable the new collation by default (#32016)
ref pingcap/tidb#32015
2022-02-08 12:53:35 +08:00
3c777c4022 statistics/handle: migrate test-infra to testify (#32135)
Signed-off-by: tison <wander4096@gmail.com>
2022-02-07 21:30:52 +08:00
c30e8320d8 *: correct use require (#31904)
ref pingcap/tidb#31716
2022-02-07 18:11:35 +08:00
23f7e51ae0 *: Use the new CI script as default (#31752)
close pingcap/tidb#31893
2022-01-27 21:25:13 +08:00
e7da7d4f95 *: change fsp from int8 to int (#28347) 2022-01-27 13:59:12 +08:00