• Tom Lane's avatar
    Improve the way in which CatalogCacheComputeHashValue combines multiple key · 402bd494
    Tom Lane authored
    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?
    402bd494
catcache.c 46.9 KB