Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Cursor Behavior
Do you know I new that at one time and forgot it.
Thanks,
Paula
-----Original Message-----
Sent: Tuesday, May 06, 2003 7:57 AM
To: 'ORACLE-L_at_fatcity.com'; 'Paula_Stankus_at_doh.state.fl.us'
Paula,
When you declare a cursor, only thing is in memory is cursor pointer and associated sql. Rows are fetched only when you issue a "fetch", and not until. If I understand what you want correctly, you need to load a pl/sq ltable in memory by looping through cursor, and then perform lookup against the pl/sql table.
By using intelligent keys and a little luck it will be way faster than performing a lookup by open-fetch-close operation. This is all assuming that the lookup must be performed outside the main cursor.
Raj
-----Original Message-----
Sent: Monday, May 05, 2003 6:25 PM
To: Multiple recipients of list ORACLE-L
Guys,
Does anyone know of a good document on how cursors "behave" or "don't". My understanding was that if you declared a cursor the SQL and lookup on the table(s) would occur once and it would all be stored in memory. Then the loop and processing would occur by using the cursor in memory. However, real-time monitoring shows toggling of SQL between the "Declare Cursor Select..." part and the subsequent update processing. Yuck.
Let's see Johnathon Lewis book or Tom Kyte's or asktom or Steve F. ...hmmm.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author:
INET: Paula_Stankus_at_doh.state.fl.us
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue May 06 2003 - 09:31:40 CDT