Subject Re: [IBO] Firebird performance / IBO
Author Robert martin
Jason Wharton wrote:
>> Not sure if this question should be here or the Firebird list but
>> 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
>>
>
> No, this is very inefficient.
>
>
Ta. This is how we are currently doing it :-(

>> or
>> b) Insert regardless and trap the exception triggered by a pk
>> violation
>>
>
> You can do this in a stored procedure.
>
>
What about just from code, In Delphi using a try.. except ?



> 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.
>
>
unfortunately due to the data we cant do this.


ta Rob