我正在处理 Delphi XE6 项目。 我正在使用 Firedac 进行 PostgreSQL 连接。
这个项目中有两个数据模块,这些数据模块上有将近20个TFDtables组件。
在创建数据模块事件时,我正在为所有表执行“TFDtable.open”。 这些表包含大量数据,例如 700000 到 800000 个条目。
问题在于数据加载。加载至少需要 20 秒 有没有其他办法让它更快?
最佳答案
看来您正在实现所谓的 Live Data Window Mode ,而您正在寻找 LiveWindowFastFirst属性(property)。它被描述为:
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.
所以尝试启用它:
...
FDTable1.FetchOptions.LiveWindowFastFirst := True;
FDTable1.Open;
关于postgresql - Delphi Firedac TFDtable 打开问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39761991/