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

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Fri Sep 7 13:39:48 CEST 2012



On Fri, 7 Sep 2012, Reinier Olislagers wrote:

> On 7-9-2012 13:12, michael.vancanneyt-0Is9KJ9Sb0A at public.gmane.org wrote:
>> On Fri, 7 Sep 2012, Reinier Olislagers wrote:
>>> then the transaction is started (if it is inactive) and the query
>>> parameters are filled (using Query.Params.ParamByName, but I don't
>>> suppose that would be a big slowdown??); finally the SQL is executed.
>>> The transaction is left open.
>>
>> 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?

If it prepares the statement automatically, it also unprepares it.
(at least, it should :) )

Michael.



More information about the fpc-pascal mailing list