what is explain plan?, given an example...

Answers were Sorted based on User's Feedback



what is explain plan?, given an example.....

Answer / shivainduja

An explain plan is a representation of the access path that
is taken when a query is executed within Oracle.

SQL> explain plan for select * from emp2;

Explained.

SQL> select * from table (DBMS_XPLAN.display);

PLAN_TABLE_OUTPUT
-------------------------------------
Plan hash value: 2941272003

--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost
(%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 15 | 570 | 3
(0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| EMP2 | 15 | 570 | 3
(0)| 00:00:01 |
--------------------------------------------------------------------------

8 rows selected.

Is This Answer Correct ?    4 Yes 1 No

what is explain plan?, given an example.....

Answer / rajesh venati

this will also work.

An Explain Plan is a tool that you can use to have Oracle
explain to you how it plans on executing your query.

ex:-
SQL> set autotrace on explain
SQL> select * from emp;

Execution Plan
----------------------------------------------------------
Plan hash value: 3956160932

--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost
(%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 14 | 518 | 3
(0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| EMP | 14 | 518 | 3
(0)| 00:00:01 |
--------------------------------------------------------------------------

Is This Answer Correct ?    1 Yes 0 No

what is explain plan?, given an example.....

Answer / suresh somayajula

Explain Plan determines the execution plan of SQL statement.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Can a primary key be a foreign key?

1 Answers  


Is coalesce faster than isnull?

1 Answers  


List different type of expressions with the example.

1 Answers  


what is top in tsql? : Transact sql

1 Answers  


What is the Diff b/w Constraints and Trigeer

4 Answers   HCL,


what are the differences between char and varchar? : Sql dba

1 Answers  


How to process query result in pl/sql?

1 Answers  


What is cursor in pl sql with examples?

1 Answers  


how can create data base link for tow servers (scott schema) give examples plz

2 Answers  


what is a composite key ? : Sql dba

1 Answers  


what is commit? : Sql dba

1 Answers  


What are different sql data types?

1 Answers  


Categories