pgsql: Add cost estimation of range @> and <@ operators.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add cost estimation of range @> and <@ operators.
Date: 2013-03-14 13:37:25
Message-ID: E1UG8LV-0002JQ-6E@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/59d0bf9dca58b237902c2fd1507e8bc5d54d4a63

Modified Files
--------------
src/backend/utils/adt/rangetypes_selfuncs.c | 541 ++++++++++++++++++++++++-
src/backend/utils/adt/rangetypes_typanalyze.c | 125 ++++++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_operator.h | 1 +
src/include/catalog/pg_statistic.h | 12 +-
5 files changed, 667 insertions(+), 14 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-03-14 17:05:49 pgsql: Change the way UESCAPE is lexed, to reduce the size of the flex
Previous Message Peter Eisentraut 2013-03-14 02:44:03 pgsql: Add regression tests for XML mapping of domains