tidb icon indicating copy to clipboard operation
tidb copied to clipboard

Dynamically update statistics

Open alivxxx opened this issue 9 years ago • 2 comments

As data changes, the statistics will be out of date. Currently, we only update the table's count dynamically, but this is not enough. We may also need to update the histograms, cm sketch, and fm sketch. For cm sketch, both the deletion and addition are easy. For fm sketch, both the deletion and addition are hard because we simply keep the NDV itself. For histograms, both the deletion and addition are hard, because we may face the problem of splitting a bucket, we do not know the new bucket's precise depth. Maybe we can use the continuous value assumption to assign the depth, then use the query feedback to change it, so we can avoid scanning the real data which is very expensive.

alivxxx avatar Nov 16 '17 02:11 alivxxx

Could we finish this in 1.1?

shenli avatar Nov 16 '17 03:11 shenli

@shenli Yes.

alivxxx avatar Nov 16 '17 04:11 alivxxx