Re: subselect requires offset 0 for good performance.

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: subselect requires offset 0 for good performance.
Дата
Msg-id CAOR=d=0S6NqnX=TfX1=81M442=LM6QaN1fy7FHowVCfVskipOg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: subselect requires offset 0 for good performance.  (Vik Fearing <vik.fearing@dalibo.com>)
Ответы Re: subselect requires offset 0 for good performance.
Список pgsql-performance
OK I'm bumping this one last time in the hopes that someone has an
idea what to do to fix it.

Query plan: http://explain.depesz.com/s/kJ54

This query takes 180 seconds. It loops 17391 times across the lower
index using entries from the upper index. That seems buggy to me.
While the exact estimates are off, the fact that it estimates 10,433
rows in the above index scan means that it's expecting to do that many
loops on the bottom index scan.

This is one of those queries where adding an offset 0 to the inner
select reduces run time from 180s to 0.2s. And I can't imagine a plan
that thinks running 10k loops on an index scan is a good idea.


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

Предыдущее
От: Daniel Cristian Cruz
Дата:
Сообщение: Index on a range array
Следующее
От: Tom Lane
Дата:
Сообщение: Re: subselect requires offset 0 for good performance.