Re: Cursors and different settings for default_statistics_target

Поиск
Список
Период
Сортировка
От Steinar H. Gunderson
Тема Re: Cursors and different settings for default_statistics_target
Дата
Msg-id 20080401195744.GA22880@uio.no
обсуждение исходный текст
Ответ на Re: Cursors and different settings for default_statistics_target  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
On Tue, Apr 01, 2008 at 12:42:03PM -0400, Tom Lane wrote:
>> That's CURSOR_OPT_FAST_PLAN and isn't it? Our application reads the full
>> results of most cursors.
> Just out of curiosity, why use a cursor at all then?

This isn't the same scenario as the OP, but I've used a cursor in cases where
I cannot keep all of the dataset in memory at the client at once, but I _can_
coerce it down to a more manageable size as it comes in.

I don't know if a cursor is the only way to do this (short of making a custom
function inside Postgres of some sort), but it seems to be the simplest way
in libpqxx, at least.

/* Steinar */
--
Homepage: http://www.sesse.net/

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Cursors and different settings for default_statistics_target
Следующее
От: "samantha mahindrakar"
Дата:
Сообщение: Too many commands in a transaction