Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

TRUNCATE/INSERT or MERGE functions : which one load data fastly

638976Jan 4 2010 — edited Jan 4 2010
Hi All,

We are selecting data from multiple tables and putting into a table for this operation we are created one procedure and executing daily that procedure to load data.

Procedure are created like this

Create or replace procesure…

Begin

Execute immediate 'Truncate table AGENT_MONTHLY_PREMIUM';

begin
INSERT /*+ APPEND PARALLEL("AGENT_MONTHLY_PREMIUM") */
into AGENT_MONTHLY_PREMIUM

commit;

end;

end ;

In above case daily truncate the table and inserts fresh data daily.

********************************************************************

We are planning to implement merge logic instead of TRUNCATE/INSERT.

Which is the best way to load data either truncate/insert or MERGE.

Which one load data firstly.

Thanks and Regards
Venkat
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 1 2010
Added on Jan 4 2010
11 comments
6,530 views