Re: MERGE statement - where time goes ?

  • From: "Dennis Williams" <oracledba.williams@xxxxxxxxx>
  • To: makulev@xxxxxxx
  • Date: Mon, 23 Jul 2007 14:35:58 -0500

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

Other related posts: