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

Home
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
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
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.