Cursor behavior - Mailing list pgsql-hackers

From amit sehas
Subject Cursor behavior
Date
Msg-id 1323983757.63733.YahooMailClassic@web160504.mail.bf1.yahoo.com
Whole thread Raw
Responses Re: Cursor behavior  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
HI,

I had a question about the cursor internals implementation. When you Fetch next 'n' results without moving the cursors,
isthis kind of functionality implemented by firstly executing the whole query and then moving the cursor over the
results,or are the movements done on active database lookups, moving forward and backward...
 

it seems that the cursor implementation functions evaluate the whole query and then return results as requested, it
wouldseem to be too difficult to otherwise support a functionality that returns next 10 results without moving the
cursors...we need to determine this since in our case we are
 
dealing with a query that returns millions of records, and we would rather the cursor did not evaluate the whole query
upfront...

any help is greatly appreciated...

thanks


pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Autonomous subtransactions
Next
From: amit sehas
Date:
Subject: array behavior