Re: Retry: Is this possible / slow performance?

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Retry: Is this possible / slow performance?
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3412A7613@Herge.rcsinc.local
обсуждение исходный текст
Ответ на Retry: Is this possible / slow performance?  ("Joost Kraaijeveld" <J.Kraaijeveld@Askesis.nl>)
Список pgsql-performance
> >> The best solution is probably to put a LIMIT into the DECLARE
CURSOR,
> >> so that the planner can see how much you intend to fetch.
> I assume that this limits the resultset to a LIMIT. That is not what I
was
> hoping for. I was hoping for a way to scrolll throught the whole
tables
> with orders.
>
> I have tested, and if one really wants the whole table the query with
"set
> enable_seqscan = on" lasts 137 secs, the query with "set
enable_seqscan =
> off" lasts 473 secs, so (alas), the planner is right.
>
> I sure would like to have ISAM like behaviour once in a while.

Then stop using cursors.  A few months back I detailed the relative
merits of using Cursors v. Queries to provide ISAM like functionality
and Queries win hands down.  Right now I am using pg as an ISAM backend
for a relatively old and large COBOL ERP via a C++ ISAM driver, for
which a publicly available version of the source will be available Real
Soon Now :-).

Merlin

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

Предыдущее
От: "Joost Kraaijeveld"
Дата:
Сообщение: Re: Retry: Is this possible / slow performance?
Следующее
От: "Paul Johnson"
Дата:
Сообщение: Solaris 9 tuning