Subject | Re: [IBO] Firebird performance / IBO |
---|---|
Author | Robert martin |
Post date | 2006-11-07T04:09:25Z |
Jason Wharton wrote:
ta Rob
>> Not sure if this question should be here or the Firebird list butTa. This is how we are currently doing it :-(
>> 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.
>
>
>> orWhat about just from code, In Delphi using a try.. except ?
>> b) Insert regardless and trap the exception triggered by a pk
>> violation
>>
>
> You can do this in a stored procedure.
>
>
> Better yet, if you can, configure the data to be inserted as an externalunfortunately due to the data we cant do this.
> 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.
>
>
ta Rob