pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Bo Lorentsen <bl@netgroup.dk>
Cc: Russell Simpkins <russellsimpkins@hotmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Number of rows in a cursor ?
Date: Wed, 24 Aug 2005 07:19:22 -0600
Message-ID: <20050824131921.GA39444@winnie.fuhr.org> (raw)
In-Reply-To: <430C6CFF.9070304@netgroup.dk>
References: <B74B7433CDDD2C4AA41D94832E32E19D92EE9A@EMEXM1112.dir.svc.accenture.com>
	<430C4C70.2010005@netgroup.dk>
	<BAY103-DAV72BF461390EA073012267B5A80@phx.gbl>
	<430C6CFF.9070304@netgroup.dk>

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



view thread (13+ messages)  latest in thread

Message-ID: <20050824131921.GA39444@winnie.fuhr.org>
Permalink:  ../20050824131921.GA39444@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050824131921.GA39444@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, bl@netgroup.dk, russellsimpkins@hotmail.com
  Subject: Re: Number of rows in a cursor ?
  In-Reply-To: <20050824131921.GA39444@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox