pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Joerdens <frank@joerdens.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org, Nic <nferrier@tapsellferrier.co.uk>
Cc: Seb Potter <seb@woome.com>
Subject: Re: Query w empty result set with LIMIT orders of magnitude slower than without
Date: Tue, 26 Aug 2008 19:41:49 +0100
Message-ID: <7d10d2df0808261141k4ca6800dm5c847098af8da51d@mail.gmail.com> (raw)
In-Reply-To: <10025.1219769589@sss.pgh.pa.us>
References: <7d10d2df0808260937v3103e216h764bbb74ca597d6f@mail.gmail.com>
	<10025.1219769589@sss.pgh.pa.us>

On Tue, Aug 26, 2008 at 5:53 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Frank Joerdens" <frank@joerdens.de> writes:
>> It seems to me that the planner makes a very poor decision with this
>> particular query:
>
> Try increasing the stats on woouser.  You need it to make a smaller
> estimate of the number of matching rows here:

Way cool, this

alter table webapp_invite alter column woouser set statistics 50;

did the trick, without cleaning up the spurious join there even.

Thanks!

Frank



view thread (4+ messages)

Message-ID: <7d10d2df0808261141k4ca6800dm5c847098af8da51d@mail.gmail.com>
Permalink:  ../7d10d2df0808261141k4ca6800dm5c847098af8da51d@mail.gmail.com/
Also on:    postgresql.org/message-id/7d10d2df0808261141k4ca6800dm5c847098af8da51d@mail.gmail.com

 · 

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: frank@joerdens.de, tgl@sss.pgh.pa.us, nferrier@tapsellferrier.co.uk, seb@woome.com
  Subject: Re: Query w empty result set with LIMIT orders of magnitude slower than without
  In-Reply-To: <7d10d2df0808261141k4ca6800dm5c847098af8da51d@mail.gmail.com>
  References: <7d10d2df0808260937v3103e216h764bbb74ca597d6f@mail.gmail.com> <10025.1219769589@sss.pgh.pa.us> <7d10d2df0808261141k4ca6800dm5c847098af8da51d@mail.gmail.com>

* 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