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

Поиск
Список
Период
Сортировка
От Frank Joerdens
Тема Re: Query w empty result set with LIMIT orders of magnitude slower than without
Дата
Msg-id 7d10d2df0808261141k4ca6800dm5c847098af8da51d@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Query w empty result set with LIMIT orders of magnitude slower than without  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
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

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception
Следующее
От: henk de wit
Дата:
Сообщение: Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception