Subject | RE: [IBO] Firebird performance / IBO |
---|---|
Author | Jason Wharton |
Post date | 2006-11-07T03:32:28Z |
> Not sure if this question should be here or the Firebird list butNo, this is very inefficient.
> thought the component might have some impact.
>
> If I have to do millions of inserts into a table is it quicker to do
>
> a) Check to see if record exists, if not add it
> orYou can do this in a stored procedure.
> b) Insert regardless and trap the exception triggered by a pk
> violation
Better yet, if you can, configure the data to be inserted as an external
text file and do it all on the server using the stored procedure.
You can have it do the insert in a BEGIN END block and catch and handle the
exception as you please. Typically, I handle it as an update of some kind,
but your situation may vary.
Jason Wharton