|Subject||Re: What is better: UPDATE or DELETE + INSERT?|
> ---In firstname.lastname@example.org, <brucedickinson@...> wrote :Think about indices:>> Hello,
> 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 in database and decrease its performance?
- when you do UPDATE, Firebird will add new index entries only for those indices which keys was changed;
- when you do DELETE and INSERT, Firebird will add new index entries for every index in relation.