pgsql: Improve the way in which CatalogCacheComputeHashValue combines - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Improve the way in which CatalogCacheComputeHashValue combines
Date
Msg-id 20070421044920.9BE1C9FA616@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
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?

Modified Files:
--------------
    pgsql/src/backend/utils/cache:
        catcache.c (r1.136 -> r1.137)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/catcache.c.diff?r1=1.136&r2=1.137)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Adjust pgstat_initstats() to avoid repeated searches of the
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Tweak make_inh_translation_lists() to check the common case