Re: Query w empty result set with LIMIT orders of magnitude slower than without

From: "Frank Joerdens" <frank(at)joerdens(dot)de>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org, Nic <nferrier(at)tapsellferrier(dot)co(dot)uk>, "Seb Potter" <seb(at)woome(dot)com>
Subject: Re: Query w empty result set with LIMIT orders of magnitude slower than without
Date: 2008-08-26 18:41:49
Message-ID: 7d10d2df0808261141k4ca6800dm5c847098af8da51d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Aug 26, 2008 at 5:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Frank Joerdens" <frank(at)joerdens(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message henk de wit 2008-08-26 20:29:48 Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception
Previous Message Scott Marlowe 2008-08-26 18:23:30 Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception