X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8AD03D738C for ; Wed, 24 Aug 2005 10:19:29 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32295-02 for ; Wed, 24 Aug 2005 13:19:26 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 2C8EDD7321 for ; Wed, 24 Aug 2005 10:19:25 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j7ODJOx9016298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Aug 2005 07:19:26 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j7ODJN1e049284; Wed, 24 Aug 2005 07:19:23 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j7ODJM1Z049279; Wed, 24 Aug 2005 07:19:22 -0600 (MDT) (envelope-from mfuhr) Date: Wed, 24 Aug 2005 07:19:22 -0600 From: Michael Fuhr To: Bo Lorentsen Cc: Russell Simpkins , pgsql-sql@postgresql.org Subject: Re: Number of rows in a cursor ? Message-ID: <20050824131921.GA39444@winnie.fuhr.org> References: <430C4C70.2010005@netgroup.dk> <430C6CFF.9070304@netgroup.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <430C6CFF.9070304@netgroup.dk> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 required=5 tests=[AWL=0.005] X-Spam-Level: X-Archive-Number: 200508/223 X-Sequence-Number: 22451 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