pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Lewis <mark.lewis@mir3.com>
Cc: Evan Carroll <lists@evancarroll.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Fwd: 8.2 Query 10 times slower than 8.1 (view-heavy)
Date: Tue, 28 Aug 2007 14:48:00 -0400
Message-ID: <1368.1188326880@sss.pgh.pa.us> (raw)
In-Reply-To: <1188319891.22730.63.camel@archimedes>
References: <428b865e0708280822u522391ecr5366bb5a6647f1aa@mail.gmail.com>
	<dcc563d10708280832u4b0b9abbh1b5053bd1b2a9149@mail.gmail.com>
	<428b865e0708280901x3776581qc424bb2c52531475@mail.gmail.com>
	<dcc563d10708280907r4b67217eta560c8eab710ab3c@mail.gmail.com>
	<428b865e0708280923k57b8cbe4l3dd01fca75975c3f@mail.gmail.com>
	<428b865e0708280924ye13ead1j5c198778cdea9c6@mail.gmail.com>
	<1188319891.22730.63.camel@archimedes>

Mark Lewis <mark.lewis@mir3.com> writes:
> Unfortunately there has been a planner regression in 8.2 in some cases
> with these forms of queries.  This was discussed a few weeks (months?)
> ago on this forum.  I haven't looked closely enough to confirm that this
> is the problem in your case, but it seems likely.

Yeah, the EXPLAIN ANALYZE output clearly shows a drastic underestimate
of the number of rows out of a join like this, and a consequent choice
of a nestloop above it that performs terribly.

> We've been holding back from upgrading to 8.2 because this one is a
> show-stopper for us.

Well, you could always make your own version with this patch reverted:
http://archives.postgresql.org/pgsql-committers/2006-11/msg00066.php

I might end up doing that in the 8.2 branch if a better solution
seems too large to back-patch.

			regards, tom lane



view thread (12+ messages)  latest in thread

Message-ID: <1368.1188326880@sss.pgh.pa.us>
Permalink:  ../1368.1188326880@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1368.1188326880@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, mark.lewis@mir3.com, lists@evancarroll.com
  Subject: Re: Fwd: 8.2 Query 10 times slower than 8.1 (view-heavy)
  In-Reply-To: <1368.1188326880@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