pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: El-Lotso <el.lotso@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Re: 500rows = 1min/2.5k rows=20min/6K rows 2 hours and still running
Date: Wed, 12 Sep 2007 10:41:16 -0400
Message-ID: <22159.1189608076@sss.pgh.pa.us> (raw)
In-Reply-To: <1189584573.13796.12.camel@neuromancer.home.net>
References: <1189529868.17184.17.camel@neuromancer.home.net>
	<1189530143.17184.21.camel@neuromancer.home.net>
	<15496.1189535000@sss.pgh.pa.us>
	<1189563332.32450.11.camel@neuromancer.home.net>
	<1189584573.13796.12.camel@neuromancer.home.net>

El-Lotso <el.lotso@gmail.com> writes:
> I'm really at my wits end here. 

Try to merge the multiple join keys into one, somehow.  I'm not sure why
the planner is overestimating the selectivity of the combined join
conditions, but that's basically where your problem is coming from.

A truly brute-force solution would be "set enable_nestloop = off"
but this is likely to screw performance for other queries.

			regards, tom lane



view thread (10+ messages)  latest in thread

Message-ID: <22159.1189608076@sss.pgh.pa.us>
Permalink:  ../22159.1189608076@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22159.1189608076@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, el.lotso@gmail.com
  Subject: Re: Re: 500rows = 1min/2.5k rows=20min/6K rows 2 hours and still running
  In-Reply-To: <22159.1189608076@sss.pgh.pa.us>

* 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