pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alex Hunsaker <badalex@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Xiao Meng <mx.cogito@gmail.com>
Cc: Zdenek Kotala <Zdenek.Kotala@sun.com>
Cc: pgsql-patches@postgresql.org, "Jonah H. Harris" <jonah.harris@gmail.com>
Subject: Re: hash index improving v3
Date: Tue, 9 Sep 2008 21:04:58 -0600
Message-ID: <34d269d40809092004q10b5da87r6fa3fe86926476ff@mail.gmail.com> (raw)
In-Reply-To: <34d269d40809091823t204e252fl246443be71aed9ff@mail.gmail.com>
References: <10995.1220577198@sss.pgh.pa.us>
	<11962.1220581027@sss.pgh.pa.us>
	<34d269d40809042048m3b532a5ej7a9588f63a788d0c@mail.gmail.com>
	<34d269d40809050912u33f2afc8mb90e316bc465136e@mail.gmail.com>
	<34d269d40809051321w2ed16037od0373a4a29c311f1@mail.gmail.com>
	<34d269d40809052249h59750f83v4b19a50d0555580@mail.gmail.com>
	<22574.1220728178@sss.pgh.pa.us>
	<34d269d40809061923k4c731481gf580d46d259defb0@mail.gmail.com>
	<20080909134839.GC6714@it.is.rice.edu>
	<34d269d40809091823t204e252fl246443be71aed9ff@mail.gmail.com>

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

Attachments:

  gen.pl (application/x-perl, 174B) download

view thread (63+ messages)  latest in thread

Message-ID: <34d269d40809092004q10b5da87r6fa3fe86926476ff@mail.gmail.com>
Permalink:  ../34d269d40809092004q10b5da87r6fa3fe86926476ff@mail.gmail.com/
Also on:    postgresql.org/message-id/34d269d40809092004q10b5da87r6fa3fe86926476ff@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-patches@postgresql.org
  Cc: badalex@gmail.com, tgl@sss.pgh.pa.us, mx.cogito@gmail.com, Zdenek.Kotala@sun.com, jonah.harris@gmail.com
  Subject: Re: hash index improving v3
  In-Reply-To: <34d269d40809092004q10b5da87r6fa3fe86926476ff@mail.gmail.com>
  References: <10995.1220577198@sss.pgh.pa.us> <11962.1220581027@sss.pgh.pa.us> <34d269d40809042048m3b532a5ej7a9588f63a788d0c@mail.gmail.com> <34d269d40809050912u33f2afc8mb90e316bc465136e@mail.gmail.com> <34d269d40809051321w2ed16037od0373a4a29c311f1@mail.gmail.com> <34d269d40809052249h59750f83v4b19a50d0555580@mail.gmail.com> <22574.1220728178@sss.pgh.pa.us> <34d269d40809061923k4c731481gf580d46d259defb0@mail.gmail.com> <20080909134839.GC6714@it.is.rice.edu> <34d269d40809091823t204e252fl246443be71aed9ff@mail.gmail.com> <34d269d40809092004q10b5da87r6fa3fe86926476ff@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox