FD provides a batch execution function, called an Array DML. You can do this:
FDQuery1.Sql.Text:=' INSERT into Mytab values (:p 1,:p 2,:p 3) ';Here Fdquery1.params collection are filled by 3 parametersFDQuery1.Params.ArraySize:=100;For I:=0To100-1DoBegin FDQuery1.Params[0]. Asintegers[i := i; Fdquery1. Params[1]. Asstrings[i] := ' qwe ' Span class= "sy1" >; Fdquery1. Params[2]. Clear (I; End
/span>
FDQuery1. Execute(0);//starting from 0, performing 100 batch executions
ShowMessage(inttostr(FDQuery1. rowsaffected));//show the number of successful executions
Onexecuteerror event to handle execution errors
Procedure TForm1.Fdquery1executeerror(Asendertobjectinteger; var aaction: Tfderroraction) ; Begin if aerror. Errors[0]. Kind = ekukviolated then aaction := Easkip Span class= "KW1" >else aaction := eafail; End
 
FIREDAC Database Bulk statement submission (efficient)