Delphi Firedac TFDtable open issue

狂风中的少年 提交于 2019-12-08 06:09:03

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!