5.70.0.28 cpu at 100% while fetching
Posted: Wed 07 Mar 2007 08:47
I seem to have a problem with the odac component taking 100% of the cpu while fetching results, even though it only gets about 10 rows/min due to complex query.
So, I have code something like this which just gets all results (and not just the first 25).
Query.First;
Query.MoveBy(Query.RecordCount-1); // step to the last fetched row i think?
While not Query.Eof do
begin
Query.Next;
Label1.Caption := 'Fetching row ' + IntToStr(Query.RecNo);
Application.ProcessMessages;
end;
If I step through this Query.Next is instant 24 times, but the 25th when it needs to get more result it just hangs for a few minutes (while oracle tries to get the results i suppose) and cpu goes to 100% and the application seems to hang (not so nice).
Is this a known problem? Is it fixed in a later version? I made a quick attempt to find where it is but no luck...
So, I have code something like this which just gets all results (and not just the first 25).
Query.First;
Query.MoveBy(Query.RecordCount-1); // step to the last fetched row i think?
While not Query.Eof do
begin
Query.Next;
Label1.Caption := 'Fetching row ' + IntToStr(Query.RecNo);
Application.ProcessMessages;
end;
If I step through this Query.Next is instant 24 times, but the 25th when it needs to get more result it just hangs for a few minutes (while oracle tries to get the results i suppose) and cpu goes to 100% and the application seems to hang (not so nice).
Is this a known problem? Is it fixed in a later version? I made a quick attempt to find where it is but no luck...