Re: Horribly slow hash join

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Horribly slow hash join
Date: 2004-04-16 16:34:11
Message-ID: 450.1082133251@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> Note the time for the hash join step:

Have you ANALYZEd these tables lately?

It looks to me like it's hashing on some column that has only a small
number of distinct values, so that the hash doesn't actually help to
avoid comparisons. The planner should know better than to choose such
a plan, but if it's working with obsolete stats ...

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-04-16 16:36:57 Re: Poor performance of group by query
Previous Message Mike Nolan 2004-04-16 15:46:02 Re: Long running queries degrade performance