Commit Graph

62 Commits

Author SHA1 Message Date
375b71b501 stats: resolve the constant selectivity when handling DNF exprs (#31242)
close pingcap/tidb#31096
2022-01-07 18:28:38 +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
8550dbb216 *: add cardinality estimation trace for Selectivity (#29883) 2021-11-29 17:01:52 +08:00
d15ca2a869 planner: unify the argument of range functions to use SessionCtx instead of StatementContext (#29999) 2021-11-23 12:35:51 +08:00
xhe
94e30df8e2 parser: fix compiling, add unit tests (#28700) 2021-10-11 23:15:25 +08:00
a0de91fa06 statistics: fix a error check to prevent nil dereference (#27295) 2021-08-17 17:04:00 +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
83181c6bcb planner: steady expression index selection when having duplicate expressions (#25826) 2021-08-02 14:47:06 +08:00
8945d64362 planner: fix the panic that the index's range length may exceed its original column count (#25267) 2021-06-18 12:04:38 +08:00
f1a48216b2 statistics: fix some potential panic in statistics (#23988) 2021-04-15 21:15:53 +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
27a9b3e8f6 statistics: fix stack overflow when use DNF expr immediately after add column (#22169) 2021-01-06 12:08:10 +08:00
151ef8492b statistics: prioritize low selectivity indexes in the greedy search procedure of Selectivity() (#20038) 2020-09-22 19:17:42 +08:00
0684dba6c8 util/ranger: extract multi-column DNF conditions as access conditions (#19211) 2020-09-17 20:08:34 +08:00
b78f4896fe statistics, util/ranger: improve selectivity calculation for DNF filters (#18741) 2020-08-27 15:40:12 +08:00
f172a1e08a planner: make some access paths check fit the clustered index (#18998)
* planner: make some access paths check fit the clustered index

* add test

* add test for outer join elimination

* make test stable

* fix test

Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
2020-08-10 15:33:17 +08:00
60dbf2b119 planner: rename table path to IntHandlePath (#17962)
Co-authored-by: lysu <sulifx@gmail.com>
2020-06-15 11:00:20 +08:00
cc24101d97 statistics: fix repetitive selectivity accounting and stabilify the result (#15536) 2020-04-03 15:50:09 +08:00
7b09a11f17 planner,stats: don't re-calculate the index's ranges (#12856) 2019-12-04 17:19:48 +08:00
9d74d6404f planner, executor: index join enhancement (#8471) 2019-04-29 11:07:15 +08:00
e5f734e54c *: move the Handle of stats to single package. (#10149) 2019-04-17 13:42:34 +08:00
46ead360cc statistics: add PhysicalID to Column (#9394) 2019-02-22 17:30:31 +08:00
9bdba3a5d1 plan: handle DNF expressions in Selectivity (#9282) 2019-02-13 10:53:12 +08:00
82d2726300 planner, statistics: build new histogram using range information (#7921) 2019-01-14 20:33:36 +08:00
b74d0283a2 statistics: fix pseudo estimation for correlated column (#8734) 2018-12-25 22:40:38 +08:00
f7d8ca624a plan: use Column.UniqueID in conditionChecker of ranger (#8236) 2018-11-12 12:45:25 +08:00
e195df2e5d stats: fix selectivity estimation for primary key (#8134) 2018-11-01 20:38:08 +08:00
32b1dbd8d5 *: rename "github.com/pkg/errors" to "github.com/pingcap/errors" (#8136)
We import "github.com/pkg/errors" in the code, and actually put
the "github.com/pingcap/errors" there in the vendor path.
That's a dirty hack, and prevent the introduce of Go module.
2018-11-01 16:09:07 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
87c54b2610 plan, statistics: maintain HistColl in DataSource's StatsInfo (#7385) 2018-08-31 01:14:43 +08:00
44e6c3c2e1 plan, stats: fix inconsistent row count estimation (#7233) 2018-08-06 17:39:33 +08:00
25f1e808f5 Use the revive linter. (#7197) 2018-07-31 13:19:09 +08:00
34d8fd8d8d plan, statistics: extract histColl struct (#6860) 2018-07-13 14:42:07 +08:00
c5524cb238 plan, executor: use CorrelatedColumn to calculate range. (#6779) 2018-06-28 16:23:05 +08:00
326ad271d6 plan: enhance the row count estimation when correlated column exists (#6911) 2018-06-27 13:33:15 +08:00
c348afebf1 stats: refine row count estimation (#6746) 2018-06-04 20:45:30 +08:00
7ea70d5433 statistics: uniform the calculation of pseudo stats. (#6483) 2018-05-09 11:31:06 +08:00
12dbd32854 *: rename NewRange to Range. (#6368) 2018-04-25 13:13:04 +08:00
58326c844e stats: fix pseudo selectivity for primary key (#6302) 2018-04-18 10:10:03 +08:00
905eda7ff5 stats: fix row estimation for pseudo unique key (#6199) 2018-04-02 20:27:58 +08:00
4f991afb10 *: session context passed to newBaseBuiltinFuncWithTp should not be nil (#6178) 2018-03-29 16:12:36 +08:00
12c87929b8 *:fix some golint && ineffassign && misspell to improve GoReport Result (#5867) 2018-02-23 19:31:05 +08:00
4e1a114e68 *: move package context to sessionctx (#5890) 2018-02-22 18:03:38 +08:00
51c47a4ddc plan: The stats of some table is outdated, we use pseudo to estimate. (#5802) 2018-02-08 11:22:21 +08:00
ac4229aed0 plan, ranger: index range calculation enhancement. (#5611) 2018-01-31 15:35:59 +08:00
c45111d9f6 stats: use more compact structure for histograms (#5539)
* stats: use more compact structure for histograms

* address comments

* address comments

* refine code

* address comment
2018-01-05 20:43:01 +08:00
8b149c3323 Prealloc / collides with package name (#5560) 2018-01-05 19:15:54 +08:00
b901867b83 util/ranger: change BuildRange to build column/index/table range (#5509) 2017-12-27 06:16:19 -06:00
fa62e9fd01 *: merge ranger.IndexRange and ranger.ColumnRange. (#5485) 2017-12-26 16:08:36 +08:00