Page 1 of 1

migrating from NexusDB

Posted: Tue 05 Sep 2017 08:32
by kickMartens
Hi
I am migrating my app from NexusDB to postgres and postgresql DAC. I running into performance problems and memory issues. My app lets users navigate and edit datasets using a DBnavigator. These tables (or queries) can be quite large. When I open a dataset and navigate to last, all the records are read into memory, resulting in a "out of memory" message. Is there a way around this? I want to be able to let my users navigate to the first or last record, but I don't need to cache ALL the records, only the current one. If I use a unidirectional dataset, I cannot edit the dataset.
So I want to limit the amount of cached records to 1 (or a limited set) like the unidirectional datasets, but have the freedom to navigate back and forth, and edit the dataset. Is this possible? Do the Devart DAC components work the same as Firedac in this respect?

Re: migrating from NexusDB

Posted: Wed 06 Sep 2017 13:39
by azyk
In the described case, the error message 'Out of memory' may occur when there is a lack of memory resources in the system to fetch a large amount of data to the client side.

To reduce memory consumption in PgDAC, try using the SmartFetch mode. For this, set the TPgQuery.SmartFetch.Enabled property to True. More details about the SmartFetch mode settings: https://www.devart.com/pgdac/docs/?deva ... embers.htm

Set the FetchRows property to 1, in order for PgDAC to fetch one record to dataset per one request to PostgreSQL. For more information about FetchRows in our online documentation: https://www.devart.com/pgdac/docs/?deva ... chrows.htm

Also specify whether you use BLOB data when navigating/editing tables in the application.