Re: Retry: Is this possible / slow performance? - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: Retry: Is this possible / slow performance?
Date
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3412A7613@Herge.rcsinc.local
Whole thread Raw
In response to Retry: Is this possible / slow performance?  ("Joost Kraaijeveld" <J.Kraaijeveld@Askesis.nl>)
List 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 by date:

Previous
From: "Joost Kraaijeveld"
Date:
Subject: Re: Retry: Is this possible / slow performance?
Next
From: "Paul Johnson"
Date:
Subject: Solaris 9 tuning