UniQuery cannot handle large tables
Posted: Thu 19 May 2022 01:59
I have been using Uni components for years and currently am on Version 9.2.1 and in Delphi XE7 (32 bit) and Firebird 3.
If I setup a connection to a Firebird DB and then setup any UniQuery component to run a query of the type
"SELECT * FROM sometable" on a table with something in the order of 5 million records (or more). It does not matter what the table is - it is the number of records in that table.
and then I do something like
qryAction.sql.text := 'SELECT * FROM CUSTOMERS';
qryAction.ReadOnly:=true;
qryAction.open;
qryAction.first;
while not qryAction.EOF do
qryAction.next;
This will fail - in my case this seems to fail at around record 4,286,250. I get an 'Out of Memory' error.
I normally never do anything like this of course. I only came across this problem as I am trying to export all of the records in a table to a CSV file, hence I have to loop through all records. But it is not anything to do with the export stuff - I can just run the empty loop above and the thing will fail.
The UniQuery does not have any special properties set. Just drop the default on a form and run this simple query.
Any suggestions?
If I setup a connection to a Firebird DB and then setup any UniQuery component to run a query of the type
"SELECT * FROM sometable" on a table with something in the order of 5 million records (or more). It does not matter what the table is - it is the number of records in that table.
and then I do something like
qryAction.sql.text := 'SELECT * FROM CUSTOMERS';
qryAction.ReadOnly:=true;
qryAction.open;
qryAction.first;
while not qryAction.EOF do
qryAction.next;
This will fail - in my case this seems to fail at around record 4,286,250. I get an 'Out of Memory' error.
I normally never do anything like this of course. I only came across this problem as I am trying to export all of the records in a table to a CSV file, hence I have to loop through all records. But it is not anything to do with the export stuff - I can just run the empty loop above and the thing will fail.
The UniQuery does not have any special properties set. Just drop the default on a form and run this simple query.
Any suggestions?