Page 1 of 1

Saving memory used by TZQuery

Posted: 03.10.2014, 23:27
by tobias_de
Hello,
my application needs to read memory rows from a database sequentially. Unfortunately, TZQuery caches them all and uses a lot of memory. Is there another component that acts more like a cursor and keeps only one row in memory? Or can I clear the cache from time to time?
Cheers
Tobias

Re: Saving memory used by TZQuery

Posted: 03.10.2014, 23:45
by EgonHugeist
You can use the TZReadOnlyQuery instead.
Another suggestion:
Switch to 7.2. The TZReadOnlyQuery support also Unidirectional mode -> one row buffered (((: (Delphi, On FPC they are still allocing Row-by-Row but i didn't check if they free the buffers too)

Re: Saving memory used by TZQuery

Posted: 04.10.2014, 09:27
by tobias_de
Many thanks! Very cool, I will try 7.2 :)