问题
I am working on Delphi XE6 project. I am using Firedac for PostgreSQL connection.
There are two datamodules in this project and there are almost 20 TFDtables components on these data modules.
On create event of datamodules I am doing "TFDtable.open" for all tables. These tables contains lots of data say 700000 to 800000 entries.
Issue is with loading of data. It takes atleast 20 sec to load Is there any other way out to make it faster?
回答1:
It seems that you're implementing so called Live Data Window Mode, and you are looking for the LiveWindowFastFirst property. It is described as:
LiveWindowFastFirst
If it is set to True, then FireDAC builds a query to return the first results as fast as possible. If it is set to False (the default value), then FireDAC minimizes the time to return all table rows.
So try to enable it:
...
FDTable1.FetchOptions.LiveWindowFastFirst := True;
FDTable1.Open;
来源:https://stackoverflow.com/questions/39761991/delphi-firedac-tfdtable-open-issue