Hello.
We are FoxPro programmers trying to learn Oracle.
That's not necessarily relevant, but if you know FoxPro, it will help you know where we're coming from.
We have an Oracle procedure that looks something like:
Our question is this:
When we run the cursor:
from a SQL Editor, it executes immediately (because it only returns the first 100, 500, etc.whatever rows). HOWEVER, it appears to be clear to us that within the procedure, it returns the entire cursor before it begins fetching the rows one by one.
(In FoxPro, they have the Scan...EndScan...). We are desperate to find a way to process a cursor row-by-row, so it doesn't eat up our server's resources to pull this huge cursor into memory (20M, 70M, 100M records).
Any help you can provide is greatly appreciated!
Thank you.
-Mike Kemp
We are FoxPro programmers trying to learn Oracle.
That's not necessarily relevant, but if you know FoxPro, it will help you know where we're coming from.
We have an Oracle procedure that looks something like:
Code:
create or replace procedure SomeProcName as
cursor SomeCurName is
select awhole,bunchof,stuff
from AReallyBigTable;
vcAWhole AReallyBigTable.AWhole%type;
vcBunchOf AReallyBigTable.BunchOf%type;
vcStuff AReallyBigTable.Stuff%type;
begin
open SomeCurName;
loop
fetch SomeCurName into vcAWhole,vcBunchOf,vcStuff;
-- we do some stuff here...
-- more stuff here...
-- ok this is enough...
end loop;
end SomeProcName;
Our question is this:
When we run the cursor:
Code:
select awhole,bunchof,stuff
from AReallyBigTable;
(In FoxPro, they have the Scan...EndScan...). We are desperate to find a way to process a cursor row-by-row, so it doesn't eat up our server's resources to pull this huge cursor into memory (20M, 70M, 100M records).
Any help you can provide is greatly appreciated!
Thank you.
-Mike Kemp