time a query with where clause : Timing « SQL Plus « Oracle PL / SQL






time a query with where clause

   
SQL>
SQL> create table my_all_objects
  2  nologging
  3  as
  4  select * from all_objects
  5  union all
  6  select * from all_objects
  7  union all
  8  select * from all_objects
  9  /

Table created.

SQL>
SQL> insert into my_all_objects
  2  ( owner, object_name, object_type, object_id )
  3  values
  4  ( 'New Owner', 'New Name', 'New Type', 1111111 );

1 row created.

SQL>
SQL>
SQL> set timing on
SQL> select owner, count(*)
  2    from my_all_objects
  3   where owner = 'New Owner'
  4   group by owner;

OWNER                          COUNT(*)
------------------------------ --------
New Owner                          1.00

Elapsed: 00:00:00.10
SQL> set timing off
SQL>
SQL>
SQL> drop table my_all_objects;

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 lower text function
5.Loop timing
6.timing unconditional loop
7.Statistics query Timing on index
8.Performace difference between sql and pl/sql
9.TIMING table copying
10.Timing passing table collection parameter to a procedure