git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 089da3c) | patch
Add support for building GiST index by sorting.
2020年9月17日 08:33:40 +0000 (11:33 +0300)
2020年9月17日 08:33:40 +0000 (11:33 +0300)
commit 16fa9b2b30a357b4aea982bd878ec2e5e002dbcc
Add support for building GiST index by sorting.

This adds a new optional support function to the GiST access method:
sortsupport. If it is defined, the GiST index is built by sorting all data
to the order defined by the sortsupport's comparator function, and packing
the tuples in that order to GiST pages. This is similar to how B-tree
index build works, and is much faster than inserting the tuples one by
one. The resulting index is smaller too, because the pages are packed more
tightly, upto 'fillfactor'. The normal build method works by splitting
pages, which tends to lead to more wasted space.

The quality of the resulting index depends on how good the opclass-defined
sort order is. A good order preserves locality of the input data.

As the first user of this facility, add 'sortsupport' function to the
point_ops opclass. It sorts the points in Z-order (aka Morton Code), by
interleaving the bits of the X and Y coordinates.

Author: Andrey Borodin
Reviewed-by: Pavel Borisov, Thomas Munro
Discussion: https://www.postgresql.org/message-id/1A36620E-CAD8-4267-9067-FB31385E7C0D%40yandex-team.ru
17 files changed:
doc/src/sgml/gist.sgml diff | blob | blame | history
src/backend/access/gist/gistbuild.c diff | blob | blame | history
src/backend/access/gist/gistproc.c diff | blob | blame | history
src/backend/access/gist/gistutil.c diff | blob | blame | history
src/backend/access/gist/gistvalidate.c diff | blob | blame | history
src/backend/access/transam/xloginsert.c diff | blob | blame | history
src/backend/utils/sort/sortsupport.c diff | blob | blame | history
src/backend/utils/sort/tuplesort.c diff | blob | blame | history
src/include/access/gist.h diff | blob | blame | history
src/include/access/gist_private.h diff | blob | blame | history
src/include/access/xloginsert.h diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/pg_amproc.dat diff | blob | blame | history
src/include/catalog/pg_proc.dat diff | blob | blame | history
src/include/utils/sortsupport.h diff | blob | blame | history
src/include/utils/tuplesort.h diff | blob | blame | history
src/test/regress/expected/create_index.out diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /