200fe45550
stats: prework for analyze push down ( #4478 )
2017-09-11 14:06:21 +08:00
88e1666ac6
*: change the log package to logrus ( #4452 )
2017-09-08 00:45:07 -05:00
0e438de9ff
*: move sample collector from executor to stats ( #4468 )
2017-09-08 12:21:10 +08:00
e3cbcad807
should use time.Since instead of time.Now().Sub ( #4445 )
2017-09-06 12:15:24 +08:00
19a13dec6f
stats: update handle version before update stats ( #4361 )
2017-08-31 11:42:05 +08:00
a8f18440fd
statistics_test: avoid unnecessary create new store ( #4241 )
2017-08-21 13:12:30 +08:00
97afa26e1f
stats: fix a panic bug. ( #4257 )
2017-08-21 13:01:19 +08:00
7c273c0f29
*: implement auto analyze ( #4141 )
2017-08-18 18:42:28 +08:00
611695bf7a
statistics: fix bug when update stats delta ( #4098 )
2017-08-09 15:58:38 +08:00
3d8d1d6f45
*: refine tests. ( #4016 )
2017-08-04 00:15:20 +08:00
520785b149
*: fix possible race in stats update ( #3987 )
2017-08-03 20:54:15 +08:00
2c4a46e2f0
statistics: return 1 when statistics is not ready and row count of table is 0 ( #3952 )
2017-07-31 14:28:04 +08:00
dff73cc6e4
*: Modify the Makefile for go vet ( #3900 )
2017-07-30 23:02:52 -05:00
c6b4aa8fe5
plan, statistics: plan topn more precisely. ( #3902 )
2017-07-27 10:53:22 +08:00
62fcf2c798
statistics: make the naming more coherent ( #3827 )
2017-07-20 18:06:00 +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
ec796ba999
plan, statistics: begin to use statsProfile to estimate count and cardinality. ( #3728 )
2017-07-13 16:57:27 +08:00
f9c62ee67e
statistics: add test ( #3727 )
2017-07-13 11:38:32 +08:00
bebd5c59e4
statistics: fix bug when calculate lowerbound ( #3677 )
2017-07-10 15:40:46 +08:00
aa41e3aaf4
*: support show stats ( #3633 )
2017-07-06 16:51:59 +08:00
467a01a2d0
*: support drop stats ( #3615 )
...
* plan, executor: support drop stats
* ast: add comment
* address comment
* address comment
2017-07-05 17:01:36 +08:00
8072082323
statistics: introduce selectivity calculation ( #3161 )
2017-07-04 13:00:19 +08:00
0f50d286bd
statistics: add table.GetRowCountByColumnRanges method. ( #3530 )
2017-07-03 10:52:41 +08:00
73cfeac540
statistics: add variable member for table. ( #3586 )
2017-07-03 10:43:23 +08:00
d0358ceb1c
executor, statistics: remove useless code and rename file name. ( #3564 )
2017-06-29 14:52:19 +08:00
11247bf083
statistics: no longer pass inAndEqCnt to calc pseudo index row count ( #3515 )
2017-06-20 22:19:46 +08:00
b73c562ab4
statistics: fix a divided by zero bug ( #3481 )
...
* statistics: fix a divided by zero bug
* add test
2017-06-15 13:53:27 +08:00
1ccc71a94a
statistics, ranger: add method to calculate the range and row count of non pk column ( #3234 )
2017-06-13 12:01:05 +08:00
1ac2be8cc5
statisitcs: estimate range result with increase factor. ( #3432 )
2017-06-09 15:24:15 +08:00
7ae996c411
Set stats lease. ( #3408 )
2017-06-07 18:19:52 +08:00
8eed6456e9
statistics: store and load null count. ( #3350 )
2017-05-31 12:58:27 +08:00
a81726a42f
executor, statistics: analyze with null count. ( #3336 )
2017-05-26 16:44:09 +08:00
607af0bb7f
statistics: estimate by lower bound. ( #3341 )
2017-05-26 16:12:35 +08:00
7a5cd973f8
statisitics: build and load with lowerbound ( #3327 )
2017-05-25 15:00:36 +08:00
31579bb3f0
Fix asyncGetTSWorker goroutine leak ( #3291 )
2017-05-22 16:53:31 +08:00
0dfc245aad
*: change the schema of stats_bucket and stats_hist. ( #3295 )
2017-05-22 00:44:01 +08:00
10fc9fcd44
tidb: eliminate runtime.morestack from getTimestamp call stack ( #3054 )
2017-05-04 20:06:37 +08:00
a9a33b0209
fix typo ( #3179 )
2017-04-29 00:24:27 +08:00
9e1022a90c
statistics: make getIntColumnRowCount correct ( #3146 )
...
If we use a > 1 to build range in physical plan builder phase, will get (1, +∞) first, then we will get a []types.IntColumnRange like [{2, +∞}].
However, this range will call function greaterRowCount(). So the result actually is calculated as (2, +∞).
This pr is to fix this.
2017-04-26 14:47:53 +08:00
93f4780f40
plan: add variable countReliable to physicalPlanInfo ( #3011 )
2017-04-24 17:07:31 +08:00
ef7bdb0d1f
ddl, statistics: support drop table and schema. ( #3106 )
2017-04-22 16:48:28 +08:00
bbad497023
ddl, statistics: update the stats table after creating/ droping column. ( #3061 )
2017-04-21 11:51:06 +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
6fa6a990f8
statistics: use PrevLastVersion to avoid error. ( #3060 )
...
Currently, we use startTS of a txn as the version of a stats table. There may be an error like this:
txn1 with version 2 write firstly.
TiDB update it, and the latest udpate version is 2.
then txn2 with version 1 write.
TiDB will never get it with the version 2.
So we choose to get the table stats which version is greator than the version before last two lease.
2017-04-17 22:50:03 +08:00
10e005f1e6
statistics: every histogram use its own version to update. ( #3059 )
...
after we support delta updae in #3053 , we shouldn't load the whole histogram when we find the table version updated. Every histogram has it's own version.
2017-04-17 21:13:18 +08:00
3126e5e341
*: online update count in table stats. ( #3053 )
...
When insert and update happens, we will cache the changed info in every session. After a duration(five minutes now) passes, handle will sweep every cache and merge them. Then dump the delta info to TiKV.
2017-04-15 21:20:44 +08:00
846ad93577
*: update stats after creating table. ( #3048 )
2017-04-14 14:26:54 +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