Add cost estimation of range @> and <@ operators.
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Add cost estimation of range @> and <@ operators. The estimates are based on the existing lower bound histogram, and a new histogram of range lengths. Bump catversion, because the range length histogram now needs to be present in statistic slot kind 6, or you get an error on @> and <@ queries. (A re-ANALYZE would be enough to fix that, though) Alexander Korotkov, with some refactoring by me.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/rangetypes_selfuncs.c | modified | +536 −5 |
| src/backend/utils/adt/rangetypes_typanalyze.c | modified | +121 −4 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_operator.h | modified | +1 −0 |
| src/include/catalog/pg_statistic.h | modified | +8 −4 |