Home » SQL & PL/SQL » SQL & PL/SQL » Performance of MERGE statement
Performance of MERGE statement [message #430492] Tue, 10 November 2009 12:54 Go to next message
nchaitu
Messages: 2
Registered: November 2009
Location: india
Junior Member
Can any one help me in monitoring the performance of merge statement in Oracle?

Source for the merge statement is the select statement against a view and the target is summary table.
Merging Process finished succesfully but it took 2 days to merge 40 million records.
How do I see which part of this process consuming more time? wether select statement to fetch the source records or the actual merge statement?
Re: Performance of MERGE statement [message #430494 is a reply to message #430492] Tue, 10 November 2009 13:03 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
ALTER SESSION SET SQL_TRACE=TRUE;
-- invoke the problem SQL here
MERGE .....
ALTER SESSION SET SQL_TRACE=FALSE;

now find the trace file within ./udump folder
tkprof <trace_file.trc> trace_results.txt explain=<username>/<password>

post the contents of trace_results.txt back here
Previous Topic: Question on methodology
Next Topic: DDL for a Table
Goto Forum:
  


Current Time: Mon Nov 04 04:35:20 CST 2024