CRBatchMove Performance issues
Posted: Thu 21 Nov 2013 16:13
I am using Delphi XE ver 1.5 where I have a project using BDE to batch-move a paradox database file into my work database.
I have acquired IBDAC in order to improve the performance of my batchMove but when I compare the two on a two-column table of 10k entries, the BDE batchmover outperforms the IBDAC by almost a factor 10. Closer investigation revealed that the IBDAC batchmover performs at the same level with CommitCount=1 and CommitCount=10k, so I suspect that entries are written 1 at a time in my current setup. Clearly I am doing something wrong and I hope you can help me.
I use a TVirtualTable for source table and a TIBCTable for destination table. The Batchmover is TCRBatchmover.
This is the way I use the batchmover:
The settings on the classes are default settings
I have acquired IBDAC in order to improve the performance of my batchMove but when I compare the two on a two-column table of 10k entries, the BDE batchmover outperforms the IBDAC by almost a factor 10. Closer investigation revealed that the IBDAC batchmover performs at the same level with CommitCount=1 and CommitCount=10k, so I suspect that entries are written 1 at a time in my current setup. Clearly I am doing something wrong and I hope you can help me.
I use a TVirtualTable for source table and a TIBCTable for destination table. The Batchmover is TCRBatchmover.
This is the way I use the batchmover:
Code: Select all
var
I : integer;
iIBDACBatchMode : TCRBatchMode;
SourceTableName : string;
DestinationTableName : string;
before,after : Integer;
begin
iIBDACBatchMode := bmAppend;
FIBDACBatchMover.Source := FIBDACSourceTable;
FIBDACBatchMover.Destination := FIBDACDestinationTable;
DestinationTableName := FIBDACDestinationTable.TableName;
for i :=0 to FIBDACSourceTable.FieldCount-1 do
FIBDACBatchMover.Mappings.Add(FIBDACSourceTable.FieldDefs[i].Name);
if FdbuType in [dbuIB,dbuACCESS97] then
FIBDACBatchMover.Mode := iIBDACBatchMode
else
raise Exception.Create('DBU type not supported: '+GetEnumName(TypeInfo(TdbuType),Ord(FdbuType)));
try
before := getTickCount;
FIBDACBatchMover.Execute;
after := GetTickCount;
except
on E: Exception do raise Exception.Create('Error in batch mover'#10+E.Message);
end;
end