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

From Alex Hunsaker
Subject Re: hash index improving v3
Date
Msg-id 34d269d40809092004q10b5da87r6fa3fe86926476ff@mail.gmail.com
Whole thread Raw
In response to Re: hash index improving v3  ("Alex Hunsaker" <badalex@gmail.com>)
Responses Re: hash index improving v3  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
List pgsql-patches
On Tue, Sep 9, 2008 at 7:23 PM, Alex Hunsaker <badalex@gmail.com> wrote:
> BTW Im still planning on doing a wide vs narrow test... sometime... :)

narrow: (exactly the same as what I just did in the other post)
create table test_hash(num int8);
insert into test_hash (num) select generate_series(1, 2000000);
create index test_hash_num_idx on test_hash using hash (num);

pgbench -c1 -n -t100000 -f bench_index.sql
cvs head: tps = 7345.69432
v5:           tps = 7526.290462


wide:
# NOTE not on the same machine as the "narrow" test was run!

# spit out 2, 000, 000 random 100 length strings
perl gen.pl > data.sql
create table test_hash (wide text);
copy test_hash from './data.sql';
create index test_hash_num_idx on test_hash using hash (wide);

bench.sql:
select a.wide from test_hash as a inner join test_hash as b on b.wide
= a.wide where a.wide =
'BJNORSLMITGKHJCWDBLKLYRSJTVPTYXZJPWNBKXGHYFNDHRAKNFMDHRMUXLDXNTRBJMTHPGPBFJZPAENZXDHAHCUSCJTUPUXWCXUH';

# ^ that string is in data.sql

# 3 runs each
pgbench -c1 -n -t100000 -f bench.sql
cvs head: tps = 5073.463498, 5110.620923, 4955.347610
v5:           tps = 5870.681336, 5740.007837, 5699.002942

Attachment

pgsql-patches by date:

Previous
From: "Alex Hunsaker"
Date:
Subject: Re: hash index improving v3
Next
From: Kenneth Marshall
Date:
Subject: Re: hash index improving v3