Re: SQL select query becomes slow when using limit (with no offset)

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: SQL select query becomes slow when using limit (with no offset)
Дата
Msg-id 407d949e0907310542k613d2beeqddf17424e22e7d43@mail.gmail.com
обсуждение исходный текст
Ответ на SQL select query becomes slow when using limit (with no offset)  (Kees van Dieren <keesvandieren@gmail.com>)
Ответы Re: SQL select query becomes slow when using limit (with no offset)
Список pgsql-performance
On Fri, Jul 31, 2009 at 1:11 PM, Kees van Dieren<keesvandieren@gmail.com> wrote:
> It takes 155ms to run this query (returning 2 rows)
>
> Query plan: without limit:
> "Sort  (cost=20169.62..20409.50 rows=95952 width=16)"

Could you send the results of EXPLAIN ANALYZE for both queries?
Evidently the planner is expecting a lot more rows than the 2 rows
you're expecting but it's not clear where it's gone wrong.


--
greg
http://mit.edu/~gsstark/resume.pdf

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

Предыдущее
От: Kees van Dieren
Дата:
Сообщение: SQL select query becomes slow when using limit (with no offset)
Следующее
От: PFC
Дата:
Сообщение: Re: SQL select query becomes slow when using limit (with no offset)