Re: Query capture

  • From: Mohammad Rafiq <rafiq9857@xxxxxxxxx>
  • To: breitliw@xxxxxxxxxxxxx
  • Date: Thu, 7 Apr 2005 14:02:27 -0400

Stephen

Are you sure it ran successfully? I got error on a 9206 database on W2000.
Regards
Rafiq
SQL> set linesize 132
SQL> set pagesize 100
SQL> break on query
SQL> column query format a50 wrap heading "Query Text"
SQL> column timeinseconds format 999999999.99 heading "Time In Seconds"
SQL> column place format 9999999 heading "Place"
SQL>
SQL> select rownum place, query, timeinseconds, cur_id, address
  2  from (
  3  select a.sql_text query,
  4  a.elapsed_time/(1000000*a.executions) timeinseconds,
  5  a.hash_value cur_id,
  6  a.address
  7  from v$sql a
  8  where a.executions>0
  9  and (a.elapsed_time/(1000000*a.executions)) > 5
 10  order by timeinseconds desc)
 11  /
and (a.elapsed_time/(1000000*a.executions)) > 5
                   *
ERROR at line 9:
ORA-01476: divisor is equal to zero





On Apr 7, 2005 12:48 PM, Wolfgang Breitling <breitliw@xxxxxxxxxxxxx> wrote:
> I thought that's what I said. elapsed_time and cpu_time didn't exist in
> v$sql prior to Oracle9.
> 
> Seema Singh wrote:
> 
> > there is no column in v$sql table in Oracle8i.which table ?
> >
> >> From: Wolfgang Breitling <breitliw@xxxxxxxxxxxxx>
> >>
> >> elapsed_time and cpu_time are always in microseconds since they didn't
> >> exist in v$sql in the centiseconds era before Oracle9i.
> 
> --
> Regards
> 
> Wolfgang Breitling
> Centrex Consulting Corporation
> www.centrexcc.com
> --
> //www.freelists.org/webpage/oracle-l
>
--
//www.freelists.org/webpage/oracle-l

Other related posts: