Details
-
Sub-task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Derby should collect extra statistics during index build time, statistics refresh time which will help optimizer make more precise selectivity estimates and chose better execution paths.
We eventually want to utilize the new statistics to make better selectivity estimates / cost estimates that will help find the best query plan. Currently Derby keeps two type of stats - the total row count and the number of unique values.
We are initially extending the stats to include null count, the minimum value and maximum value associated with each of the columns of an index. This would be useful in selectivity estimates for operators such as [ IS NULL, <, <=, >, >= ] , all of which currently rely on hardwired selectivity estimates.