What is the difference between TDataSet and TClientDataset memory management?

I use TIBDataSet to retrieve records from a database table using Firebird with Delphi 2007. This table contains approximately 1 million records, and I get the error Out of memory . The same query works correctly with TClientDataset , though.

Could you tell the difference between TClientDataset and TDataSet respect to memory management?

+4
source share
1 answer

@alzaimar has a point, millions of records loaded into memory on a 32-bit platform will be a problem regardless of the component of the data set used.

So the memory on the box is crucial.

We do similar things with applications written in Delphi 2006. We do them on the 64-bit version of the 64th or 64th Windows7 server.

Using additional memory for the OS and other applications.

Try Best memory manager for Delphi

Also put {$ SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE} in the yur source project to get up to 4 GB of 32-bit delphi in a 64-bit field.

 program Project15; uses Forms, Unit15 in 'Unit15.pas' {Form15}; {$R *.res} {$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE} begin Application.Initialize; Application.CreateForm(TForm15, Form15); Application.Run; end. 

Doing the above will let you see what works best for your TDataSet or TClientDatset application.

You can also consider using some third-party components data connection, which improved performance and memory management for the main Delphi data objects.

We use Devart components and SQL tools, and they really cost money. Devart Data Tools Website

-1
source

All Articles