tidb
tidb copied to clipboard
Use better estimation methods for values that stats never saw
When we query a value that the stats never saw, we will estimate as if they do not exist. However, we can use better estimation methods:
-
For equality queries, we can estimate them based on NDV.
-
For range queries, we can estimate them based on histograms and uniform spread assumptions.