Re: Horribly slow hash join

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Horribly slow hash join
Date: 2004-04-18 15:46:35
Message-ID: 19739.1082303195@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Greg Stark <gsstark(at)mit(dot)edu> writes:
> Eh? Oh, negative numbers? So low^high^sign.

[ thinks about it... ] Yeah, that would work. We can't backpatch it
without breaking existing hash indexes on int8, but it'd be reasonable
to change for 7.5 (since at the rate things are going, we won't have
pg_upgrade for 7.5 anyway...)

> I wonder if it makes sense to have check the hash distribution after
> generating the table and if it's bad then throw it away and try again with a
> different hash function. The "different hash function" would probably just be
> a seed value changing. Probably way overkill though.

Yeah, it'd be a pain trying to get all the type-specific hash functions
doing that. I'm also unconvinced that a simple change of seed value
would necessarily make the distribution better. In the worst case, if
the real problem is that all the input values are identical, you can
reseed all day long and it won't fix it.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Dennis Bjorklund 2004-04-18 15:58:38 Re: Horribly slow hash join
Previous Message Tom Lane 2004-04-18 15:39:10 Re: Horribly slow hash join