Re: How to get the total number of rows returned by query when using a cursor?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to get the total number of rows returned by query when using a cursor?
Дата
Msg-id 17549.1064331778@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How to get the total number of rows returned by query when using a cursor?  ("Egor Shipovalov" <pgsql_list@eonline.ru>)
Ответы Re: How to get the total number of rows returned by query when using a cursor?  ("Egor Shipovalov" <pgsql_list@eonline.ru>)
Список pgsql-general
"Egor Shipovalov" <pgsql_list@eonline.ru> writes:
> The interesting thing is that some queries are tens (!) of times slower with
> LIMIT that without. These contain a number of joins on subselects. If you're
> interested, I'll post examples.

Sounds like the planner is misestimating costs and choosing the wrong plan.
Please show examples (EXPLAIN ANALYZE for same query with and without
LIMIT would be useful).

            regards, tom lane

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

Предыдущее
От: "Egor Shipovalov"
Дата:
Сообщение: Re: How to get the total number of rows returned by query when using a cursor?
Следующее
От: Robert Treat
Дата:
Сообщение: Re: About GPL and proprietary software