Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Question about fetch huge number of records!
Greetings,
I am developing an application using C++, and using OCI to access Oracle database.
One process read data from a table, let' call it TA, and handle each record read from TA. The code is like following:
select fields from TA;
set prefetch rows to 200.
loop
fetch a record
handle the record
sleep a while
end loop
For some reason, I have to slow down the speed of fetch, so I have a "sleep" in the loop. So that, each second, only about 20 records are fetched.
But sometime, TA initially contains a huge number of records (more than 400k records), so the fetch will take a very long time (several hours).
MY QUESTION IS: Will that cause server resource (memory, CPU) are seized for the selection??? Since server need to keep the selection result.
If this is not a good way, do you have an alternation?
Thanks in advance!
Evan
Received on Wed Jul 16 2003 - 21:03:50 CDT
![]() |
![]() |