If you are able to execute the queries then I would suggest getting familiar with the DBMS_PROFLIER functionality. The Oracle PL/SQL Profiler is a tool that can help provide statistics about the run-time behavior of PL/SQL code. The tool gathers information about PL/SQL source code as it executes and stores that information in tables. Once the execution is complete you can report on the stored profiler data to determine:
- The total number of times a line was
executed
- The the minimum, maximum, and average
execution time of each line of code
- How long SQL statements took to
execute to completion
- Code coverage (the actual lines
executed during the analysis period)
One this information is summarized for a Profiler run you can determine which lines of source code or SQL statements can benefit the most from tuning.
Oracle documentation on the DBMS_PROFILER package is here for 10g.
Metalink Doc 243755.1 has a script to produce pretty HTML output for your profiling runs.
PROFSUM.SQL is another script that reports on the gathered data, it is available here.