denrepo

OracleSQL tuning

Every historical plan for a SQL_ID

Prints all plans AWR has captured for the statement, so you can compare a good plan with a bad one side by side.

Diagnostics PackPrompts for input

Not yet verified. How scripts are tested

ora-plan-awr.sql
1CLEAR COLUMNS2SET LINESIZE 200 PAGESIZE 0 TRIMOUT ON TAB OFF VERIFY OFF LONG 1000003 4SELECT *5FROM TABLE(DBMS_XPLAN.DISPLAY_AWR('&sql_id'));6 7SET PAGESIZE 100

Save it as ora-plan-awr.sql and run it with SQL> @ora-plan-awr.

Open in denrepo

More Oracle scripts: SQL tuning