Re: Number of rows in a cursor ? - Mailing list pgsql-sql

From Michael Fuhr
Subject Re: Number of rows in a cursor ?
Date
Msg-id 20050824131921.GA39444@winnie.fuhr.org
Whole thread Raw
In response to Re: Number of rows in a cursor ?  (Bo Lorentsen <bl@netgroup.dk>)
Responses Re: Number of rows in a cursor ?  (Bo Lorentsen <bl@netgroup.dk>)
List pgsql-sql
On Wed, Aug 24, 2005 at 02:50:07PM +0200, Bo Lorentsen wrote:
> Russell Simpkins wrote:
> >If you need a count, why not just execute one of the methods to get a 
> >count. i.e.e select count(id) ...
> 
> The reason why i don't  just make a count and then a selection of data 
> is performance.

...which is the same reason a cursor doesn't know how many rows it will
fetch until you fetch them all (or MOVE to the end of the cursor,
which fetches the rows internally).

-- 
Michael Fuhr


pgsql-sql by date:

Previous
From: Bo Lorentsen
Date:
Subject: Re: Number of rows in a cursor ?
Next
From: Josep Sanmartí
Date:
Subject: How to join several selects