I have a simple master/detail TPgQuery setup. Master has ~100000 records and detail has ~340000 (distributed quite evenly). I browse master by code with something like :
Code: Select all
while not qmaster.eof do begin
qmaster.next;
end;
qDetail's Mastersource is connected to the qMaster's Datasource, Masterfields and detailfields are filled with the (serial/integer) primary key of qMaster, qDetail's IndexFieldNames contains that same primary key. It is configured in FetchAll=True (slower to start but no network lag during traversal), Options.LocalMasterDetail is True.
The even stranger thing is that if I remove the IndexFieldNames, time to process 100 master records "falls" to 11 seconds. Wasn't this option supposed to speed up Master/detail?
I don't see what I could do to speed things up.
Thanks for your help.
Using Delphi 10.3 and PgDAC 6.2.4