pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndquadrant.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-performance@postgresql.org
Subject: Re: hashjoin chosen over 1000x faster plan
Date: Wed, 10 Oct 2007 07:31:44 +0100
Message-ID: <1191997904.4233.125.camel@ebony.site> (raw)
In-Reply-To: <470B99BE.EE98.0025.0@wicourts.gov>
References: <470B99BE.EE98.0025.0@wicourts.gov>

On Tue, 2007-10-09 at 15:09 -0500, Kevin Grittner wrote:

> I have a situation where a query is running much slower than I would
> expect.  The ANALYZE showed that it is hashing some information which
> is rarely needed.  When I set enable_hashjoin = off for the
> connection the query run in 1/1000 the time.

Can you confirm the two queries give identical outputs? It isn't clear
to me why the second sort is (never executed) in your second plan, which
I would only expect to see for an inner merge join.

Can you show the details for ControlRecord also.

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com




view thread (16+ messages)  latest in thread

Message-ID: <1191997904.4233.125.camel@ebony.site>
Permalink:  ../1191997904.4233.125.camel@ebony.site/
Also on:    postgresql.org/message-id/1191997904.4233.125.camel@ebony.site

 · 

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-performance@postgresql.org
  Cc: simon@2ndquadrant.com, Kevin.Grittner@wicourts.gov
  Subject: Re: hashjoin chosen over 1000x faster plan
  In-Reply-To: <1191997904.4233.125.camel@ebony.site>

* 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