]> granicus.if.org Git - postgresql/commit
Change hash index creation so that rather than always establishing exactly
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 15 Mar 2008 20:46:31 +0000 (20:46 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 15 Mar 2008 20:46:31 +0000 (20:46 +0000)
commitc9a1cc694abef737548a2aa096c555fa4b253102
tree70d118428f39db307a576fde01f9ade8e8aaf7bd
parent4873c96ff3f38b51b29c86ede658343be01f519f
Change hash index creation so that rather than always establishing exactly
two buckets at the start, we create a number of buckets appropriate for the
estimated size of the table.  This avoids a lot of expensive bucket-split
actions during initial index build on an already-populated table.

This is one of the two core ideas of Tom Raney and Shreya Bhargava's patch
to reduce hash index build time.  I'm committing it separately to make it
easier for people to test the effects of this separately from the effects
of their other core idea (pre-sorting the index entries by bucket number).
src/backend/access/hash/README
src/backend/access/hash/hash.c
src/backend/access/hash/hashpage.c
src/backend/optimizer/util/plancat.c
src/include/access/hash.h
src/include/optimizer/plancat.h