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

how to rename an existing column in a table? : Sql dba

0 Answers  


what is the difference between clustered and non clustered index in sql? : Sql dba

0 Answers  


How do you write a complex sql query?

0 Answers  


what is the difference between join and union? : Sql dba

0 Answers  


What is difference between group by and partition by?

0 Answers  






What is an index and types of indexes. How many number of indexes can be used per table ?

12 Answers   Accenture, BirlaSoft, Cognizant, CTS, Symphony,


i hv 30 rows with date.ex:1month hav 4 weeks i want 1st day of the every week.write the qry for that.example jan has 4 weeks i need 1st dd for evry wk

1 Answers   Aspire,


What are sql built in functions?

0 Answers  


How does sql profiler work?

0 Answers  


types of exceptions and what is meant by pragma autonomous_transaction ?what is the use.

4 Answers   3i Infotech,


What is blind sql injection?

0 Answers  


How to delete same emp id in sql query for exmaple in emp table emp id, empname, emp address. for example emp id =5, repeated in two times in rows same id how to delete same empid please any one of the write query send in my id

8 Answers   CGCI,


Categories