what is explain plan?, given an example...
Answers were Sorted based on User's Feedback
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 |
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 |
Explain Plan determines the execution plan of SQL statement.
Is This Answer Correct ? | 0 Yes | 0 No |
Which sql statement is used to return only different values?
what is mean by forward declaration and where we'll use it.
what eliminate duplicate without using roenum and not
can we update a view which is created from two tables
What is Raise_application_error ?
What is bulk collect in pl sql?
What does count (*) do in sql?
What is function and procedure?
How many times can we commit in a loop?
Does view store data in sql?
mention if it is possible to import data directly from t-sql commands without using sql server integration services? If yes, what are the commands? : Transact sql
i have a table like this. cityno cityname mails 1 BANGALORE 8KM 2 HSR LAYOUT 20KM 3 MEJISTIC 30KM 4 JAYADEVA 55KM 5 ITPL 80KM 6 HEBBAL 115KM I HAVE DATA LIKE THIS I WANT O/P LIKE THIS DISTANCE NO.OFCITY 0-50KM 3 51-100KM 2 101-150KM 4 AND SO ON pls give me answer. i want urgent