Thread: Cursor question

Cursor question

From
"Tim Barnard"
Date:
When retrieving the tuples from a select query using a cursor, are all of the matching tuples loaded into memory but only passed one at a time to the application using the cursor (I'm retrieving them with "fetch forward 1 in cursor" and using libpq)? Or is only each tuple loaded into memory, one at a time, with each fetch? I'm trying to figure out how much memory I'll need.
 
Tim
 

Re: Cursor question

From
"Tim Barnard"
Date:
Disregard my last question. I've found I can use LIMIT
and OFFSET to control the number of records returned.
 
Tim
----- Original Message -----
Sent: Friday, May 25, 2001 9:05 AM
Subject: [GENERAL] Cursor question

When retrieving the tuples from a select query using a cursor, are all of the matching tuples loaded into memory but only passed one at a time to the application using the cursor (I'm retrieving them with "fetch forward 1 in cursor" and using libpq)? Or is only each tuple loaded into memory, one at a time, with each fetch? I'm trying to figure out how much memory I'll need.
 
Tim