Page 1 of 1

SQL Error: Out of memory. Driver buffering all records.

Posted: Wed 26 Sep 2012 13:16
by alexer
Hello,
We have some issue with the dxEpress driver for MS SQL
TSQLQuery is a unidirectional dataset. Unlike other datasets, unidirectional datasets do not buffer multiple records in memory.
But your driver buffer all records in memory, as a result in query with more then 1M records we get SQL Error:Out of memory. In the same time, with standart MS SQL driver, there are no such issues.

Simple test. Delphi7 + MS SQL 2008R2
Create table with more then 100k records.
Start Delphi7, look at its memory usage. In my case it was about 26M.
Then place TSQLConnection and TSQLQuery on form. First try standart MS driver with query "select * from TABLE1". After activating query there was no process activity and memory usage was still 26M.
If we use your driver delphi takes 50% of CPU for about 10-15 sec and raises memory to 150M.

Re: SQL Error: Out of memory. Driver buffering all records.

Posted: Tue 02 Oct 2012 14:00
by AlexP
hello,

By default, in our driver, the FetchAll option is set to True, and, when opening DataSet, all records from a table are fetched to a client. To change this behaviour, you should set this option to False in TSQLConnection