Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: MERGE statement - where time goes ?
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-lReceived on Mon Jul 23 2007 - 14:35:58 CDT
![]() |
![]() |