From: yossarian on 15 Dec 2009 05:03 Shakespeare wrote: >>> This is a regular event in our shop. Our developers used to try to >>> insert, and then handle the exception if it existed and update it. We >>> cut our redo by a large factor when we asked them to switch to MERGE. >> >> They used to do an UPDATE when an exception was raised? That should be >> a bad coding practice in every shop, JMO. > > Not if the exception is a dup-val-on-index. Its a practice seen all around! IMHO the more efficient way is to try to update the row first, then perform an insert if sql%rowcount=0. Y.
First
|
Prev
|
Pages: 1 2 3 4 Prev: Optimizer 10053 trace file, strange choises made by Oracle?? Next: Compression |