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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Batch Update Problem ..

Re: Oracle Batch Update Problem ..

From: Mladen Gogala <mgogala.SPAM_ME.NOT_at_verizon.net>
Date: Tue, 08 May 2007 13:18:23 GMT
Message-ID: <pan.2007.05.08.13.18.22@verizon.net>


On Mon, 07 May 2007 21:18:53 -0700, rahul.vakil wrote:

> Surprisingly, the
> update is taking more 3 to 4 times more then insert.

Why would that be surprising? If you're doing direct insert (/*+ APPEND */), all that oracle needs to do is to allocate new blocks behind the HWM and insert them. With updates, oracle must locate the existing rows and update them. If you didn't create table with large enough PCTFREE, then row chunks are linked and you get the beauty known as "chained rows", particularly good for query performance.

>
> Now, I am using the above update + insertion logic over multiple 4k
> chunks and time taken for update + insert over all chunks is not same;
> it varies for each batch.

Oracle has something called MERGE (not "merde", as some of my Canadian friends are sometimes tempted to say) which does precisely that. Timings will vary, depending on the underlying operation. To improve timing, buy a large IBM and equip it with EMC with 128G of NVRAM. IBM handles I/O extremely well and EMC Symmetrix with 128G of NVRAM is extremely fast at it.

-- 
http://www.mladen-gogala.com
Received on Tue May 08 2007 - 08:18:23 CDT

Original text of this message

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