| From: | "Alex Hunsaker" <badalex(at)gmail(dot)com> |
|---|---|
| To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | "Xiao Meng" <mx(dot)cogito(at)gmail(dot)com>, "Zdenek Kotala" <Zdenek(dot)Kotala(at)sun(dot)com>, pgsql-patches(at)postgresql(dot)org, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com> |
| Subject: | Re: hash index improving v3 |
| Date: | 2008-09-10 03:04:58 |
| Message-ID: | 34d269d40809092004q10b5da87r6fa3fe86926476ff@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
On Tue, Sep 9, 2008 at 7:23 PM, Alex Hunsaker <badalex(at)gmail(dot)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 | Content-Type | Size |
|---|---|---|
| gen.pl | application/x-perl | 173 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2008-09-10 03:14:42 | Re: Keeping creation time of objects |
| Previous Message | Robert Haas | 2008-09-10 02:50:57 | Re: Keeping creation time of objects |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kenneth Marshall | 2008-09-10 13:04:01 | Re: hash index improving v3 |
| Previous Message | Alex Hunsaker | 2008-09-10 02:45:10 | Re: hash index improving v3 |