Skip to main content

Posts

Showing posts with the label EXPLAIN PLAN FOR oracle SQL

CREATING EXPLAIN PLAN FOR ORACLE SQL

CREATING EXPLAIN PLAN FOR ORACLE SQL The EXPLAIN PLAN statement displays execution plans chosen by the Oracle optimizer for SELECT, UPDATE, INSERT, and DELETE statements. Run This Script  To create Plan Table $ORACLE_HOME/rdbms/admin/utlxplan.sql Execute the SQL command like the following. SQL> explain plan for select * from ultimus.cor_trans_gl_hist where year=2009 order by branch_id; Explained SQL> select * from table(dbms_xplan.display); PLAN_TABLE_OUTPUT -------------------------------------------------------------------------------- Plan hash value: 1485638787 -------------------------------------------------------------------------------- | Id  | Operation          | Name              | Rows  | Bytes |TempSpc| Cost (% -------------------------------------------------------------------------------- |   0 | SELECT STATEMENT   |           ...