All in one fetch
All in one fetch is a feature that was introduced to allow you to optimize network traffic for fetching records for master and details in one server call.
By default, fetching records is done by request, i.e when the position of the master table is changed and the records of the details table aren't fetched yet for the current master Primary Key, an additional server call is made and the details records are fetched.
In some cases, it can increase network traffic and the workload of the server.
With the All in one fetch feature, all master and details records are fetched in one call, so it can reduce the workload of the server.
You can enable this feature by setting the moAllInOneFetch in master table.MasterOptions.
This feature will work only with these conditionals:
- Master and detail(s) tables use the same data adapter and it should have RemoteFetchEnabled set to True.
- moAllInOneFetch is included in master table.MasterOptions.
- dtIncludeInAllInOneFetch is included in detail table.DetailOptions.
- The detail table should be able to return all rows for the condition if MasterPK isn't set or is set to
Null
. Depending on the MasterMappingMode, the detail table should have SQL like
mmWhere | SELECT field FROM table WHERE {WHERE} |
mmParams | SELECT field FROM table WHERE (:MasterPK IS NULL) OR (field_MasterPK = :MasterPK) |