Commit Graph

35 Commits

Author SHA1 Message Date
45f9d6a00f statistics: compute and store column order correlation with handle (#9315) 2019-02-27 11:32:00 +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
6220692e3b stats: limit the length of sample values (#7931) 2018-10-18 15:30:43 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
82a6c1085c *: introduce the concept of physical ID, code refactory (#7374) 2018-08-16 10:33:24 +08:00
1285088127 executor, plan: support analyze partition table (#7190) 2018-08-01 16:39:08 +08:00
501de19821 stats: add average column size for the histogram (#5974) 2018-03-23 13:44:24 +08:00
b6ad6a20a5 stats: fix building too many buckets (#5978) 2018-03-09 17:20:29 +08:00
4e1a114e68 *: move package context to sessionctx (#5890) 2018-02-22 18:03:38 +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
835b764db3 stats: fix bug when build histograms for null json (#5545) 2018-01-04 11:15:32 +08:00
8b15cb52b7 *: move StatementContext to its own package. (#5177) 2017-11-22 00:11:14 +08:00
30a080db5c *: build and use count-min sketch (#5042) 2017-11-08 22:34:01 +08:00
62433663e5 util/types: change types path (#5007)
* util/types: change types path
2017-11-04 10:37:14 -05:00
a5266d6621 stats: fix bug when build histograms for columns (#4757) 2017-10-12 13:28:12 +08:00
6f84392d40 *: optimize SortExec (#4622)
* *: change key of orderByRow from "key []types.Datum" to "key []*types.Datum"

* address comment
2017-09-25 19:50:26 +08:00
31f7b9c3b6 *: implement analyze columns push down (#4522) 2017-09-18 14:21:10 +08:00
0e438de9ff *: move sample collector from executor to stats (#4468) 2017-09-08 12:21:10 +08:00
7c273c0f29 *: implement auto analyze (#4141) 2017-08-18 18:42:28 +08:00
520785b149 *: fix possible race in stats update (#3987) 2017-08-03 20:54:15 +08:00
e0e77d3bac *: reduce analyze table read when table contains PK (#3783)
* *: reduce analyze table read when table contains PK

* fix ci

* *: address comment

* fix ci

* statistics:make comment more accurate
2017-07-18 05:07:17 -05:00
bebd5c59e4 statistics: fix bug when calculate lowerbound (#3677) 2017-07-10 15:40:46 +08:00
a81726a42f executor, statistics: analyze with null count. (#3336) 2017-05-26 16:44:09 +08:00
7a5cd973f8 statisitics: build and load with lowerbound (#3327) 2017-05-25 15:00:36 +08:00
93f4780f40 plan: add variable countReliable to physicalPlanInfo (#3011) 2017-04-24 17:07:31 +08:00
0f2afbf44b statistics: prepare for analyze part of a table (#3062)
We need to make somthing like 'analyze index...' work, this is only the first step.
2017-04-20 14:05:51 +08:00
375148460f statistics: process the case that we lack a column in stats table (#3075)
When we can't find a column in stats table, we return a pseudo table for now. It's not reasonable.
We should return a real table and use pseudo estimation for the missed histogram.
2017-04-18 23:34:52 +08:00
dcf12b5273 statistics: refactor statistics package. (#3044) 2017-04-13 13:13:52 +08:00
8a87d775b8 statistics: remove rlock using copy on write. (#3029)
every time we update stats cache, we copy the whole map. By this way we can avoid rlock.
2017-04-12 10:22:22 +08:00
113070162e statistics: separate Column and Index Histogram (#3031) 2017-04-11 17:24:17 +08:00
e3a0dc68ce *: use column id to get stats instead of column offset (#3019)
Now we assume that the order of columns in stats matches the column offsets. It will return wrong stats sometimes.
If we analyze when a table is (c1, c2) and then drop c1, the c2's offset will become 0. But in stats the position of 0 is c1. I have added this case to test.
2017-04-10 16:03:20 +08:00
b6ff4ad4b1 statistics: add bucket structure. (#2993) 2017-04-06 10:15:18 +08:00
16cefef717 executor, statistics: use FM sketch to estimate NDV (#2966) 2017-04-01 15:03:54 +08:00
82285af11d *: change the way of column estimating. (#2956)
When the ddl happens after loading stats. We can estimate as peusdo column for the missed column, instead of making the whole table peusdo.
I havn't processed the case of index. It's the first step.
2017-04-01 14:55:09 +08:00
e7bb049b0e statistics: adjust codes. (#2952) 2017-03-29 18:09:47 +08:00