[fpc-pascal] Re: Firebird: bulk insert performance: suggestions?

Ludo Brands ludo.brands at free.fr
Fri Sep 7 13:43:37 CEST 2012


> > Do you prepare the query before you start the batch ?
> > If not, it is prepared on every insert, which is inherently slower.
> I didn't do an explicit .Prepare, but I've added it, thanks.
> I thought sqldb would prepare automatically if you are using 
> parameters though?

sqldb always uses a prepare. As long as you don't change the sql statement
or close the dataset, the prepare will only be done once. A tight "setparams
execsql" loop will prepare once and execute many times.

Ludo




More information about the fpc-pascal mailing list