From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Kenneth Marshall <ktm(at)rice(dot)edu> |
Cc: | pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: [PATCHES] updated hash functions for postgresql v1 |
Date: | 2009-01-10 18:16:34 |
Message-ID: | 1231611394.25019.86.camel@jdavis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, 2009-01-10 at 11:06 -0600, Kenneth Marshall wrote:
> > Separating mix() and final() should have some performance benefit,
> > right?
> >
> Yes, it does but the results can be swamped by other latencies in the
> code path. Tests such as Tom's benchmark of the underlying functions is
> needed to isolate the timings effectively or a benchmark like Greenplum's
> that will benefit from a more efficient function.
>
Ok. I isolated the function itself by just doing:
-- 10 million rows of random()::text
EXPLAIN ANALYZE SELECT hashtext(t) FROM randomtext;
I ran 5 times on both old and new code, eliminating the top and bottom
and taking the average of the remaining 3, and I got a 6.9% performance
improvement with the new code.
I tried quickly with a few other data types and got similar results.
It's obviously a small microbenchmark, but that's good enough for me.
Thanks!
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2009-01-10 18:30:12 | Re: [HACKERS] BUG #4516: FOUND variable does not work after RETURN QUERY |
Previous Message | Kenneth Marshall | 2009-01-10 17:06:56 | Re: [PATCHES] updated hash functions for postgresql v1 |