Why does the following code use about 800MB of memory during execution (table with 500K rows). The uderlying database is sqlite
TUniQuery *SearchQuery;
SearchQuery->SQL->Clear();
SearchQuery->SQL->Add("select * from rtable");
SearchQuery->Execute();
do
{
Application->ProcessMessages();
SearchQuery->Next();
}while(!SearchQuery->Eof);
delete SearchQuery;
nb The memory is released when the loop is exited
Thanks
Excessive memory usage
Hello,
The amount of memory used depends on many factors such as: size of data, number of rows, data type, etc.. So if the size of your table is 800Mb, and you are getting all records from it, then this requires 800Mb in memory.
To reduce memory usage, you can set the OraQuery->UniDirectional property to true.
The amount of memory used depends on many factors such as: size of data, number of rows, data type, etc.. So if the size of your table is 800Mb, and you are getting all records from it, then this requires 800Mb in memory.
To reduce memory usage, you can set the OraQuery->UniDirectional property to true.