Re: LIMIT in DECLARE CURSOR: request for comments

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: LIMIT in DECLARE CURSOR: request for comments
Дата
Msg-id Pine.LNX.4.21.0010310406220.777-100000@peter.localdomain
обсуждение исходный текст
Ответ на LIMIT in DECLARE CURSOR: request for comments  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: LIMIT in DECLARE CURSOR: request for comments  (Philip Warner <pjw@rhyme.com.au>)
Re: LIMIT in DECLARE CURSOR: request for comments  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> 1. If DECLARE CURSOR does not contain a LIMIT, continue to plan on the
> basis of 10%-or-so fetch

I'd say that normally you're not using cursors because you intend to throw
away 80% or 90% of the result set, but instead you're using it because
it's convenient in your programming environment (e.g., ecpg).  There are
other ways of getting only some rows, this is not it.

So I think if you want to make optimization decisions based on cursors
being used versus a "normal" select, then the only thing you can safely
take into account is the network roundtrip and client processing per
fetch, but that might be as random as anything.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Re: [GENERAL] 7.0 vs. 7.1 (was: latest version?)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Current CVS broken?