Re: Do you know what is fater?

From: test <>
Date: Wed, 02 Dec 2009 22:57:55 +0100
Message-ID: <hf6nt3$jv8$>

Ed Prochak schrieb:
> On Nov 25, 5:19 pm, noam gariani <> wrote:

[Quoted] >> To do update for a record , or insert a record to a db?

> Depends.
> Why do you care?

As I know in many cases an Insert can be done faster, because the DB does not have take care of concurrency, to lock the row, keep the before image for rollback and find the rows to update .... unlock ....after the commit ... so there are many easy points the DB-Engine can be optimized in performance doing an insert, but this does not say inserts are always faster than updates and does never mean do an delete+insert instead of updates.

Some Databases do any update as an kind of insert operation. Like find the block -- change it in memory -- insert changed block to datafile and mark old block as deleted. In that databases inserts and updates are quite equal. Received on Wed Dec 02 2009 - 22:57:55 CET

Original text of this message