EXPLAIN PLAN of SQL in oracle

EXPLAIN PLAN OF SQL
====================


First connect sqlplus and generate plan like below, with out executing sql.

---i will take below sql for example---
 select * from emp where empno = 202

---how to generate plan without execution.

EXPLAIN PLAN FOR
 select * from emp where empno = 202;

---- how to display generated plan--

SET LINESIZE 300
SET PAGESIZE 300
SELECT * FROM table(DBMS_XPLAN.DISPLAY);


--this sql will displays the plan.

Comments

Popular posts from this blog

Shareplex some commands

SQL Tuning Task Creation ORA-13780: SQL statement does not exist.

ORA 700 [kskvmstatact: excessive swapping observed]