Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Query capture

Re: Query capture

From: Mohammad Rafiq <rafiq9857_at_gmail.com>
Date: Thu, 7 Apr 2005 14:02:27 -0400
Message-ID: <28ae33f105040711022248b29d@mail.gmail.com>


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_at_centrexcc.com> 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_at_centrexcc.com>
> >>
> >> 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
> --
> http://www.freelists.org/webpage/oracle-l
>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 07 2005 - 14:06:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US