Re: Cursors and different settings for default_statistics_target

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cursors and different settings for default_statistics_target
Дата
Msg-id 2798.1207063805@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cursors and different settings for default_statistics_target  ("Hell, Robert" <Robert.Hell@fabasoft.com>)
Ответы Re: Cursors and different settings for default_statistics_target  ("Hell, Robert" <Robert.Hell@fabasoft.com>)
Список pgsql-performance
"Hell, Robert" <Robert.Hell@fabasoft.com> writes:
> When we use 20 as default_statistics_target the retrieval of the data
> takes 7.5 seconds - with 25 as default_statistics_target (with restart
> and analyze) it takes 0.6 seconds.
> The query plan is identical in both situations (row estimation differs a
> little bit) - the query is always fast when it is executed without a
> cursor.

A cursor doesn't necessarily use the same plan as a straight query does.
Try "EXPLAIN DECLARE curs_285058224 CURSOR FOR ..." and see if you
aren't getting different plans in these two cases.

            regards, tom lane

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

Предыдущее
От: Matthew
Дата:
Сообщение: Re: check performance parameters
Следующее
От: Ioana Danes
Дата:
Сообщение: Insert time