ba6.us - Dave's Database Related Stuff

  • home
  • blog
  • notebooks
  • projects
  • recent
  • about
  • manifesto
  • !
Home › Real Time Monitoring of Oracle

Tag Cloud

apex Application Express Auditing data dbi development export funnies HTML Java linux monitoring oem oracle performance perl rman scripting sql SQL Developer sqlplus tuning unix windows
more tags

Search

RSS Feed

Blog Posts :

Navigation

  • Feed aggregator

User login

  • Request new password

Explain Plan

dmann — Fri, 10/03/2008 - 16:56

1) Run $ORACLE_HOME/rdbms/admin/utlxplan.sql to create a plan_table in your schema. 2) Explain the statement...
TRUNCATE TABLE plan_table;
EXPLAIN PLAN SET STATEMENT_ID='&name' FOR [ SELECT STATEMENT ];
3) View the output:
@$ORACLE_HOME/rdbms/admin/utlxplps
- or -
select plan_table_output 
  from table(dbms_xplan.display('plan_table',null,'basic'));
- or -
SELECT LPAD(' ',2*(level-1)) || operation || ' ' || options || ' ' ||
       object_name || ' ' || DECODE(id,0,'Cost = ' || position) AS "Query Plan",other
  FROM plan_table
 START WITH id = 0 AND statement_id='&name'
CONNECT BY PRIOR ID = PARENT_ID AND statement_id = '&name';
References: http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci976623,00.html http://www.dbspecialists.com/presentations/use_explain.html
‹ Real Time Monitoring of Oracle up Import/Export ›
  • Printer-friendly version
  • Add new comment


Cornify
  • home
  • blog
  • notebooks
  • projects
  • recent
  • about
  • manifesto
  • !

Content Copyright 2006-2010. Links are copyright of respective owners.