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: Optimal COMMIT frequency towards Batch DMLs

Re: Optimal COMMIT frequency towards Batch DMLs

From: Darrell Landrum <DLANDRUM_at_zalecorp.com>
Date: Mon, 21 Apr 2003 08:58:33 -0800
Message-ID: <F001.00585EFF.20030421085833@fatcity.com>


Like many, many questions on this list, this one also 'depends'. This really depends on your business needs and on your resources (mostly space for large enough rollback segs or undo space). I'm usually inclined to limit commits when possible. If I've got a job which updates records and my rollback space and segment size will accommodate it, I will first entertain the idea of updating all affected records in one set. However, I realize I must be prepared to tolerate a lengthy rollback in the event of a failure. So, depending on the circumstances, I may do this update in sets based on date or some other criteria.
You may also have multiple sets of data which get updated based on different criteria and you may want to commit after each set if you want set A to remain even if set B has problems. You may also have a job where it is all or nothing where all changes must be rolled back if any fail.
Committing too frequently can also become troublesome. I've seen a procedure which committed for each iteration of a loop and caused itself ORA-01555 errors.

I'd say there's probably not a rule or a document which will say with any certainty how frequent commits should be in batch. However, what I would recommend is to search for a paper on what takes place when data is committed (or one really good source is Jonathon Lewis' book "Practical Oracle 8i", committing data is covered very early in his book / how it affects data blocks, blocks in redo, blocks in rollback, etc.) and that should 'guide' you on making a decision for each of your batch jobs depending on the circumstances. One thing for certain is that the more frequently a job commits, the more work it is doing and avoiding extra work is good where the database is concerned.

>>> VIVEK_SHARMA_at_infosys.com 04/21/03 10:21AM >>>

How may the Optimal COMMIT frequency in Batch DML Operations be determined ?

What is the Spirit behind the same ?

Any Links , Docs please ?

Thanks

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net 
-- 
Author: VIVEK_SHARMA
  INET: VIVEK_SHARMA_at_infosys.com 

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com 
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Darrell Landrum
  INET: DLANDRUM_at_zalecorp.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Apr 21 2003 - 11:58:33 CDT

Original text of this message

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