Monday, October 29, 2007

To gather a SQLTXPLAIN for a single SQL Statement.



Read Oracle Metalink Note: 215187.1 "SQLTXPLAIN.SQL - Enhanced Explain Plan and related diagnostic info for one SQL statement



Given one SQL statement within a file or from memory, it generates a comprehensive report that includes the explain plan for that SQL statement, related CBO stats, and a full set of diagnostic information on all related objects.
This tool is designed to help during the diagnostic phase of SQL performance issues (SQL tuning). Besides providing a comprehensive report, it also facilitates the creation of test cases on separate environments. During its execution, it creates a metadata script, that combined with a simple procedure to migrate the related CBO stats, it simplifies the replication of the SQL analysis environment.
The SQL statement to diagnose can be provided as a text file, or directly from memory passing as a parameter value its ID (hash_value or SQL_ID).

No comments: