TRUNCATE/INSERT or MERGE functions : which one load data fastly
638976Jan 4 2010 — edited Jan 4 2010Hi 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