]> granicus.if.org Git - postgresql/commit
Improve the way in which CatalogCacheComputeHashValue combines multiple key
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 21 Apr 2007 04:49:20 +0000 (04:49 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 21 Apr 2007 04:49:20 +0000 (04:49 +0000)
commit402bd494ce98dc263a102da99b10c2e1d6a1460d
treed7554dbd89041e7b21bf7fdf7050b133846b6155
parent11da4c671ea6391c59ed5f465e390c6635e54cf4
Improve the way in which CatalogCacheComputeHashValue combines multiple key
values: don't throw away perfectly good hash bits, and increase the shift
distances so as to provide more separation in the common case where some of
the key values are small integers (and so their hashes are too, because
hashfunc.c doesn't try all that hard).  This reduces the runtime of
SearchCatCache by a factor of 4 in an example provided by Greg Stark,
in which the planner spends a whole lot of time searching the two-key
STATRELATT cache.  It seems unlikely to hurt in other cases, but maybe
we could do even better?
src/backend/utils/cache/catcache.c