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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: MERGE statement - where time goes ?

Re: MERGE statement - where time goes ?

From: Dennis Williams <oracledba.williams_at_gmail.com>
Date: Mon, 23 Jul 2007 14:35:58 -0500
Message-ID: <de807caa0707231235u9aa0a7s803f156a112a4e85@mail.gmail.com>


Milen,

Have you compared the time to update a row vs. the time to insert a row? My understanding is that MERGE is provided as a convenience, not as a performance enhancement. My experience with Oracle has been that inserts are fast, updates are slow. With insert, you can do direct inserts (does merge use that?). With update, the existing block containing that row must first be retrieved from disk, then that block is modified. This is inherently slow.

    I'm assuming you have a lot of rows to process, or you wouldn't be concerned about performance. Can you easily separate the existing rows (to be updated) from those that don't exist (inserts)? If you can, with additional programming you might achieve superior performance.

Dennis Williams

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jul 23 2007 - 14:35:58 CDT

Original text of this message

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