Re: Understanding Hash Join performance

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Robert James <srobertjames(at)gmail(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Understanding Hash Join performance
Date: 2011-06-02 18:39:18
Message-ID: BANLkTinV-YghC9_UfoDJmjmji5DsMww8Qw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Jun 1, 2011 at 8:10 PM, Robert James <srobertjames(at)gmail(dot)com> wrote:
> A query I has spends a long time on Hash Joins (and Hash Left Joins).
> I have a few questions:
>
> 1. When does Postgres decide to do a Hash Join, over another type of Join?
> 2. Do Hash Joins normally perform poorly?  What can I do to speed them up?
> 3. What can I do to enable Postgres to use a faster type of join?

IME, hash joins usually are much faster than any other type. There's
not enough information in your email to speculate as to what might be
going wrong in your particular case, though.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Claudio Freire 2011-06-02 18:56:42 Re: Understanding Hash Join performance
Previous Message Shaun Thomas 2011-06-02 17:31:58 Re: Problem query