On Tue, 13 Oct 1998, Eric Lee Green wrote:
> Whoops! Sorry, I goofed in my post (typing faster than my brain :-).
> What I *MEANT* to say was that this superiority of cursors was not
> applicable in a web environment.
S'alright...now please backup your statement with the *why*...
> > but wha is the different between using LIMIT to get X records, and
> > definiing a cursor to FETCH X records?
>
> >From a logical point of view, none. From an implementation point of
> view, it is a matter of speed. Declaring a cursor four times, doing a
> query four times, and fetching X records four times takes more time
> than just doing a query with a LIMIT clause four times (assuming your
> query results in four screenfulls of records).
I'm going to be brain-dead here, since, as I've disclaimered
before, I've not used CURSORs/FETCHs as of yet...one person came back
already and stated that, for him, CURSOR/FETCH results were near
instantaneous with a 167k+ table...have you tested the two to ensure that,
in fact, one is/isn't faster then the other?
Marc G. Fournier scrappy@hub.org
Systems Administrator @ hub.org
scrappy@{postgresql|isc}.org ICQ#7615664