Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Delete + Insert versus Update

Delete + Insert versus Update

From: Peter Sylvester <peters_at_mitre.org>
Date: Thu, 16 Feb 2006 10:17:54 -0500
Message-ID: <43F497A2.6080804@mitre.org>


I know I should probably be running some careful crafted tests on this, but I would like to get the "theoretical" answer if I can.

What is the relative cost (say in total disk I/O and redo generated) of deleting a record and inserting a replacement (having same PK, slightly different field values) versus updating the same record?

Lets assume that the table is relatively wide (fair number of columns) and has a PK built on a single field and another index on another field. Also assume that the application updates all fields regardless of whether they have actually changed. Also assume that the PK and indexed fields are not updated, and there are no FK constraints in sight.

Unfortunately, the reason I am asking is not so theoretical. (Think third party object oriented DB agnostic application).

thanks,
--Peter
--

http://www.freelists.org/webpage/oracle-l Received on Thu Feb 16 2006 - 09:17:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US