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: Zdenek Kotala <Zdenek.Kotala@sun.com>
Cc: Xiao Meng <mx.cogito@gmail.com>
Cc: pgsql-patches@postgresql.org, "Jonah H. Harris" <jonah.harris@gmail.com>
Subject: Re: hash index improving v3
Date: Thu, 4 Sep 2008 18:42:53 -0600
Message-ID: <34d269d40809041742r6a0703dbgfbdd012f7f19de2e@mail.gmail.com> (raw)
In-Reply-To: <7627.1220569888@sss.pgh.pa.us>
References: <ded849dd0808171846g2c6c65adub942bd2510a6c94f@mail.gmail.com>
	<48BFDA8D.3080506@sun.com>
	<29987.1220560114@sss.pgh.pa.us>
	<7627.1220569888@sss.pgh.pa.us>

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;



view thread (63+ messages)  latest in thread

Message-ID: <34d269d40809041742r6a0703dbgfbdd012f7f19de2e@mail.gmail.com>
Permalink:  ../34d269d40809041742r6a0703dbgfbdd012f7f19de2e@mail.gmail.com/
Also on:    postgresql.org/message-id/34d269d40809041742r6a0703dbgfbdd012f7f19de2e@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 using the --to and --cc options:
  reply via email

  To: pgsql-patches@postgresql.org
  Cc: badalex@gmail.com, tgl@sss.pgh.pa.us, Zdenek.Kotala@sun.com, mx.cogito@gmail.com, jonah.harris@gmail.com
  Subject: Re: hash index improving v3
  In-Reply-To: <34d269d40809041742r6a0703dbgfbdd012f7f19de2e@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