TOraQuery Problem

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tracer609
Posts: 5
Joined: Fri 13 Dec 2013 14:39

TOraQuery Problem

Post by tracer609 » Fri 13 Dec 2013 14:45

Hi,

I have the following problem. I have a batch application which uses TOraQuery component to fetch data from SQL statement which returns several millions of rows. I see that TOraQuery component consumes a big amount of memory while fetching millions of rows during processing. The question is : how to limit the memory consumption by TOraQuery component during fetching of big row number. This issues causes out of memory issue.

Thanks,
Michael

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: TOraQuery Problem

Post by AlexP » Fri 13 Dec 2013 15:06

Hello,

When reading data from the DB, they are stored in the DataSet, and especially when reading large data, the Out of memory error can occur. To avoid this, you can use the UniDirectional mode and disable the FetchAll option. In this case, the DataSet will store only the number of records specified in the FetchRows property (the number of records fetched for one fetch operation). When fetching the next portion of data, the previous one will be deleted.

Post Reply