Re: Number of rows in a cursor ?

From: Bo Lorentsen <bl(at)netgroup(dot)dk>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Russell Simpkins <russellsimpkins(at)hotmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Number of rows in a cursor ?
Date: 2005-08-25 06:51:59
Message-ID: 430D6A8F.6000404@netgroup.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Michael Fuhr wrote:

>Right -- when you open a cursor PostgreSQL doesn't know how many
>rows it will return. PostgreSQL selects a query plan based on an
>*estimate* of how many rows the query will return, but until you
>fetch all the rows you can't know for sure how many rows there will
>be.
>
>
So if i make a but data set as result of a cursor I only "pay" for the
rows I actually fetch ?

/BL

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Daniel Silverstone 2005-08-25 11:13:55 table listing queries
Previous Message Michael Fuhr 2005-08-24 23:52:23 Re: Can EXCEPT Be Used for To Solve This Problem?