Skip site navigation (1) Skip section navigation (2)

Re: hashjoin chosen over 1000x faster plan

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: hashjoin chosen over 1000x faster plan
Date: 2007-10-10 06:31:44
Message-ID: 1191997904.4233.125.camel@ebony.site (view raw or flat)
Thread:
Lists: pgsql-performance
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


In response to

Responses

pgsql-performance by date

Next:From: Tomáš VondraDate: 2007-10-10 10:41:49
Subject: Re: SQL Monitoring
Previous:From: Marcin StępnickiDate: 2007-10-10 05:25:45
Subject: Re: Shared Buffer setting in postgresql.conf

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group