Difference between COMMIT and COMMIT WRITE BATCH
694224Jan 21 2010 — edited Jan 21 2010Hey folks,
Tried finding a answer for this question but none seems to have a proper answer. I know in batch mode the sql statements are actually buffered in redo log file but can i get more elaborate answer as to what really happens inside?
Assume the following scenario:-
BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE temp_rc';
INSERT INTO TEMP_RC VALUES(1,'A',240000);
INSERT INTO TEMP_RC VALUES(2,'B',60000);
INSERT INTO TEMP_RC VALUES(3,'C',50000);
COMMIT WRITE BATCH;
INSERT INTO TEMP_RC VALUES(4,'D',20000);
END;
/
Table structure of temp_rc:-
CREATE TABLE temp_rc
(id NUMBER
,name VARHCAR2(100)
,sal NUMBER)
/
In the above scenario what will be the difference between COMMIT and COMMIT WRITE BATCH. Any other example would be much appreciated.
Thanks in advance.