To check performance of query through sqlplus command prompt




  
Here's explain plan:
SQL> explain plan for
  2  select * from emp; 
Explained.

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

PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------------------
Plan hash value: 1833546154

---------------------------------------------------------------------------------------------
| Id  | Operation                   | Name          | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT            |               |     1 |    69 |     1   (0)| 00:00:01 |
|   1 |  TABLE ACCESS BY INDEX ROWID| EMPLOYEES     |     1 |    69 |     1   (0)| 00:00:01 |
|*  2 |   INDEX UNIQUE SCAN         | EMP_EMP_ID_PK |     1 |       |     0   (0)| 00:00:01 |
---------------------------------------------------------------------------------------------

Or

You can also use autotrace option:
SQL> set autotrace on

SQL> select * from emp;

Comments

Popular posts from this blog

PHP, MySQL, JavaScript & HTML5 All-in-One For Dummies

3 Best Applications that Organize your Chat and Messaging Accounts

Japan Style: Architecture Interiors Design