Statistics query Timing on index : Timing « SQL Plus « Oracle PL / SQL

Oracle PL / SQL
1. Aggregate Functions
2. Analytical Functions
3. Char Functions
4. Constraints
5. Conversion Functions
6. Cursor
7. Data Type
8. Date Timezone
9. Hierarchical Query
10. Index
11. Insert Delete Update
12. Large Objects
13. Numeric Math Functions
14. Object Oriented Database
15. PL SQL
16. Regular Expressions
17. Report Column Page
18. Result Set
19. Select Query
20. Sequence
21. SQL Plus
22. Stored Procedure Function
23. Subquery
24. System Packages
25. System Tables Views
26. Table
27. Table Joins
28. Trigger
29. User Previliege
30. View
31. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL / SQL » SQL Plus » Timing 
Statistics query Timing on index
   
SQL>
SQL> create table t
  2  as
  3  select object_name ename,
  4         mod(object_id,50deptno,
  5         object_id sal
  6    from all_objects
  7    where rownum <= 1000
  8  /

Table created.

SQL>
SQL> create index t_idx on t(deptno,ename);

Index created.

SQL>
SQL> set autotrace traceonly
SQL> set timing on
SQL> select ename, deptno, sal,
  2    sum(salover
  3      (order by deptno, enamerunning_total,
  4    sum(salover
  5      (partition by deptno
  6       order by enamedepartment_total,
  7    row_number() over
  8      (partition by deptno
  9       order by enameseq
 10  from t emp
 11  order by deptno, ename
 12  /

1000 rows selected.

Elapsed: 00:00:00.19

Execution Plan
----------------------------------------------------------
Plan hash value: 2335850315

---------------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------
|   SELECT STATEMENT   |      |  1000 43000 |     3   (0)00:00:01 |
|   |  WINDOW SORT       |      |  1000 43000 |     3   (0)00:00:01 |
|   |   TABLE ACCESS FULL| T    |  1000 43000 |     3   (0)00:00:01 |
---------------------------------------------------------------------------

Note
-----
   - dynamic sampling used for this statement


Statistics
----------------------------------------------------------
         28  recursive calls
          0  db block gets
         15  consistent gets
          0  physical reads
          0  redo size
      44533  bytes sent via SQL*Net to client
       1106  bytes received via SQL*Net from client
         68  SQL*Net roundtrips to/from client
          1  sorts (memory)
          0  sorts (disk)
       1000  rows processed

SQL>
SQL> set timing off
SQL>
SQL> drop table t;

Table dropped.

SQL>
SQL>

   
    
  
Related examples in the same category
1. Time command
2. Time and autotrace a big table
3. Time query for a huge table
4. time a query with where clause
5. Time lower text function
6. Loop timing
7. timing unconditional loop
8. Performace difference between sql and pl/sql
9. TIMING table copying
10. Timing passing table collection parameter to a procedure
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.