pgsql: Improve the way in which CatalogCacheComputeHashValue combines

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Improve the way in which CatalogCacheComputeHashValue combines
Дата
Msg-id 20070421044920.9BE1C9FA616@postgresql.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Adjust pgstat_initstats() to avoid repeated searches of the
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Tweak make_inh_translation_lists() to check the common case