Re: hash index improving v3 - Mailing list pgsql-patches

From Alex Hunsaker
Subject Re: hash index improving v3
Date
Msg-id 34d269d40809041742r6a0703dbgfbdd012f7f19de2e@mail.gmail.com
Whole thread Raw
In response to Re: hash index improving v3  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: hash index improving v3  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Thu, Sep 4, 2008 at 5:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> So my thinking right now is that we should just test this patch as-is.
> If it doesn't show really horrid performance when there are lots of
> hash key collisions, we should forget the store-both-things idea and
> just go with this.

Ok let me know if this is to naive of an approach or not hitting the
right cases you want tested.

create table hash_a (same text, uniq text);
insert into hash_a (same, uniq)  select 'same', n from
generate_series(0, 5000) as n;

create table hash_b (uniq text);
insert into hash_b (uniq)  select n  from generate_series(5000, 10000) as n;

pgbench -c 1 -t 100 -n -f of the following

hash_same.sql:
set enable_seqscan to off;
set enable_mergejoin to off;
select 1 from hash_a as a inner join hash_a as aa on aa.same = a.same;

hash_uniq.sql:
set enable_seqscan to off;
set enable_mergejoin to off;
select 1 from hash_a as a inner join hash_b as b on b.uniq = a.uniq;

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: hash index improving v3
Next
From: Tom Lane
Date:
Subject: Re: hash index improving v3