migrating from NexusDB

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 1
Joined: Tue 05 Sep 2017 08:22

migrating from NexusDB

Post by kickMartens » Tue 05 Sep 2017 08:32

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?

Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: migrating from NexusDB

Post by azyk » Wed 06 Sep 2017 13:39

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.

Post Reply