From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Improve the way in which CatalogCacheComputeHashValue combines |
Date: | 2007-04-21 04:49:20 |
Message-ID: | 20070421044920.9BE1C9FA616@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-04-21 05:56:41 | pgsql: Tweak make_inh_translation_lists() to check the common case |
Previous Message | Tom Lane | 2007-04-21 04:10:53 | pgsql: Adjust pgstat_initstats() to avoid repeated searches of the |