Re: hash index improving v3
"Alex Hunsaker" <[email protected]> Tue, 9 Sep 2008 21:04:58 -0600
| Newsgroups | gmane.comp.db.postgresql.devel.patches |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_3050_15884634.1221015898101 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Sep 9, 2008 at 7:23 PM, Alex Hunsaker <[email protected]> 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 ------=_Part_3050_15884634.1221015898101 Content-Type: application/x-perl; name=gen.pl Content-Transfer-Encoding: base64 X-Attachment-Id: f_fkxd67aj0 Content-Disposition: attachment; filename=gen.pl dXNlIHN0cmljdDsKdXNlIHdhcm5pbmdzOwoKbXkgQGNoYXJzID0gJ0EnLi4n Wic7Cgpmb3IgbXkgJHggKDAuLjIwMDAwMDApCnsKCW15ICRzdHIgPSAnJyB4 IDEwMDsKCglmb3IgbXkgJHkgKDAuLjEwMCkKCXsKCQkkc3RyIC49ICRjaGFy c1tyYW5kIEBjaGFyc107Cgl9CgoJcHJpbnQgIiRzdHJcbiI7Cn0K ------=_Part_3050_15884634.1221015898101 Content-Type: text/plain Content-Disposition: inline MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable --=20 Sent via pgsql-patches mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches ------=_Part_3050_15884634.1221015898101--