Re: CPU_TIME > ELAPSED_TIME

  • From: "Eagle Fan" <eagle.f@xxxxxxxxx>
  • To: "Zhu,Chao" <zhuchao@xxxxxxxxx>
  • Date: Mon, 29 Oct 2007 17:42:21 +0800

I did more tests on different oracle versions (9i & 10g) and different
platforms (solaris8 & solaris10).

I found that it's related to oracle version , not Solaris version.

In oracle 9i, the CPU_TIME is measured in centiseconds, but in oracle 10g,
CPU_TIME is measured by  microseconds.

On 10/29/07, Eagle Fan <eagle.f@xxxxxxxxx> wrote:
>
> hi Chao:
>
> Seems solaris10 doesn't have the rounding problem.
>
>
> SQL> select hash_value,cpu_time,elapsed_time from v$sql where
> hash_value=1270345899;
>
> HASH_VALUE            CPU_TIME              ELAPSED_TIME
> ---------- ------------------- -------------------------
> 1270345899           916902445                 916879035
>
> On 10/28/07, Zhu,Chao < zhuchao@xxxxxxxxx> wrote:
> >
> > What about in solaris 10 when it start to use microstate accounting?
> > Do we still have the same problem?
> >
> > On 10/25/07, Eagle Fan < eagle.f@xxxxxxxxx> wrote:
> > >
> > > You are right. The CPU_Time is always times of 10 000.
> > >
> > > So I agree with you that's rounding errors:)
> > >
> > > Thanks Anjo.
> > >
> > > On 10/25/07, Anjo Kolk <anjo.kolk@xxxxxxxxxxx> wrote:
> > > >
> > > >  The CPU time is really measured in Centi Seconds and multiplied
> > > > with 10000 to be micro seconds. The elapsed time is really micro 
> > > > seconds. So
> > > > you can get some interesting rounding errors :)
> > > >
> > > > Anjo.
> > > >
> > > >
> > > > On 10/23/07, Eagle Fan <eagle.f@xxxxxxxxx > wrote:
> > > > >
> > > > > Hi:
> > > > >
> > > > > I have had the same problem before. From v$sql:
> > > > >
> > > > > Delta CPU_TIME > Delta Elapsed_time. The sql is very simple, it's
> > > > > doing "INDEX UNIQUE SCAN" using PK index.'
> > > > >
> > > > > How to explain this?
> > > > >
> > > > > Thanks
> > > > >
> > > > > SQL> select CPU_TIME,ELAPSED_TIME from v$sql where
> > > > > hash_value=1769575534;
> > > > >
> > > > >                CPU_TIME            ELAPSED_TIME
> > > > > ----------------------- -----------------------
> > > > >             71025140000             70448619327
> > > > >
> > > > > SQL> exec dbms_lock.sleep(300);
> > > > >
> > > > > PL/SQL procedure successfully completed.
> > > > >
> > > > > SQL>  select CPU_TIME,ELAPSED_TIME from v$sql where
> > > > > hash_value=1769575534;
> > > > >
> > > > >                CPU_TIME            ELAPSED_TIME
> > > > > ----------------------- -----------------------
> > > > >             71030920000             70453943000
> > > > >
> > > > > SQL> select (71030920000-71025140000)/(70453943000-70448619327)
> > > > > from dual;
> > > > >
> > > > > (71030920000-71025140000)/(70453943000-70448619327)
> > > > > ---------------------------------------------------
> > > > >                                          1.08571657
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Eagle Fan
> > > > >
> > > > > Oracle DBA
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Anjo Kolk
> > > > Owner and Founder OraPerf Projects
> > > > tel:    +31-577-712000
> > > > mob: +31-6-55340888
> > >
> > >
> > >
> > >
> > > --
> > > Eagle Fan
> > >
> > > Oracle DBA
> >
> >
> >
> >
> > --
> > Regards
> > Zhu Chao
> > www.cnoug.org
> >
>
>
>
> --
> Eagle Fan
>
> Oracle DBA




-- 
Eagle Fan

Oracle DBA

Other related posts: