pgsql: Improve GiST range-contained-by searches by adding a flag for em

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Improve GiST range-contained-by searches by adding a flag for em
Дата
Msg-id E1RUmdP-00046o-VZ@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve GiST range-contained-by searches by adding a flag for empty ranges.

In the original implementation, a range-contained-by search had to scan
the entire index because an empty range could be lurking anywhere.
Improve that by adding a flag to upper GiST entries that says whether the
represented subtree contains any empty ranges.

Also, make a simple mod to the penalty function to discourage empty ranges
from getting pushed into subtrees without any.  This needs more work, and
the picksplit function should be taught about it too, but that code can be
improved without causing an on-disk compatibility break; so we'll leave it
for another day.

Since we're breaking on-disk compatibility of range values anyway, I took
the opportunity to reorganize the range flags bits; the unused
RANGE_xB_NULL bits are now adjacent, which might open the door for using
them in some other way later.

In passing, remove the GiST range opclass entry for <>, which doesn't seem
like it can really be indexed usefully.

Alexander Korotkov, with some editorializing by Tom

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c66e4f138b04d749a713ad075e16f3d60975f5ad

Modified Files
--------------
src/backend/utils/adt/rangetypes.c       |   18 ++++
src/backend/utils/adt/rangetypes_gist.c  |  129 ++++++++++++++++++++----------
src/include/catalog/catversion.h         |    2 +-
src/include/catalog/pg_amop.h            |    1 -
src/include/utils/rangetypes.h           |   21 +++--
src/test/regress/expected/opr_sanity.out |    3 +-
6 files changed, 118 insertions(+), 56 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Add pg_upgrade test suite
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Use IEEE infinity, not 1e10, for null-and-not-null case in gistp