pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Wayne Conrad <wconrad@yagni.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: 8.4.7, incorrect estimate
Date: Mon, 02 May 2011 11:04:56 -0500
Message-ID: <4DBE8FD8020000250003D101@gw.wicourts.gov> (raw)
In-Reply-To: <21729.1304349118@sss.pgh.pa.us>
References: <4DBB024B.5050500@databill.com>
	<4DBAC75C020000250003D06B@gw.wicourts.gov>
	<4DBEAF7B.1060409@yagni.com>
	<4DBEAF7B.1060409@yagni.com>
	<21729.1304349118@sss.pgh.pa.us>

Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Wayne Conrad <wconrad@yagni.com> writes:
 
>>   Total runtime: 244572.432 ms
 
> I'll take a look at fixing that, but not sure if it'll be
> reasonable to back-patch or not.  In the meantime, you need to
> look into restructuring the query to avoid nesting the EXISTS
> probes, if possible.
 
Wayne, I think your best bet at this point may be to just (INNER)
JOIN the three tables, and if there is a possibility of duplicates
to use SELECT DISTINCT.
 
-Kevin



view thread (8+ messages)  latest in thread

Message-ID: <4DBE8FD8020000250003D101@gw.wicourts.gov>
Permalink:  ../4DBE8FD8020000250003D101@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4DBE8FD8020000250003D101@gw.wicourts.gov

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, tgl@sss.pgh.pa.us, wconrad@yagni.com
  Subject: Re: 8.4.7, incorrect estimate
  In-Reply-To: <4DBE8FD8020000250003D101@gw.wicourts.gov>
  References: <4DBB024B.5050500@databill.com> <4DBAC75C020000250003D06B@gw.wicourts.gov> <4DBEAF7B.1060409@yagni.com> <21729.1304349118@sss.pgh.pa.us> <4DBE8FD8020000250003D101@gw.wicourts.gov>

* 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