Subject Re: [firebird-support] What is better: UPDATE or DELETE + INSERT?
Author Martijn Tonies (Upscene Productions)
>> I need to rebuild some records in my database. I have to choices:
>> 1. Firstly I delete set of records and then insert new ones.
>> 2. I update the existing ones.
>> What solution is preferable? Will scenerio number 1. cause more garbage
>> database and decrease its performance?
>They will generate a comparable amount of garbage, but I think updating
>the existing records is better than delete + insert, especially if there
>are also foreign key references to those records.

Agreed with Mark. From a logical point of view, if you want to modify data,
update it.

Something else doesn't make sense.

With regards,

Martijn Tonies
Upscene Productions

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!