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

Home -> Community -> Mailing Lists -> Oracle-L -> OT My weekly tip: how to execute several appends without commit

OT My weekly tip: how to execute several appends without commit

From: Juan Cachito Reyes Pacheco <jreyes_at_dazasoftware.com>
Date: Mon, 12 Apr 2004 13:35:35 -0400
Message-ID: <008801c420b4$a0ef83b0$2501a8c0@dazasoftware.com>


Tom Kyte gave a good idea to do several inserts in a table, based on distinct state in tables
without doing a commit.

For example
/*+append */ insert into a select * from b
(several process modify b) then

/*+append */ insert into a select * from b

The solution is very simple

(initial situation)

SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER into nscn FROM DUAL;

(several process modify b) then

/*+append */ insert into a
select * from b AS OF SCN nscn
union all
select * from b

I think this is the science of the obvious.

Juan Carlos Reyes Pacheco
OCP
Database 9.2 Standard Edition



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Mon Apr 12 2004 - 12:36:08 CDT

Original text of this message

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