Home » RDBMS Server » Server Administration » what is the unit time in oracle??
what is the unit time in oracle?? [message #353009] Fri, 10 October 2008 09:52 Go to next message
davidepmc
Messages: 3
Registered: October 2008
Junior Member
Hi! i'm new for here, but i've been working whit oracle since 2 years.

I'm working looking for locks in Oracle 10.2.02.

When i see the time statistics from view dba_hist__active_sess_history the number is too high, f. e.

TABLE enq: TX - row lock contention 29,626,769


this result is in seconds, miliseconds, microseconds...

Thanks a lot!



Re: what is the unit time in oracle?? [message #353015 is a reply to message #353009] Fri, 10 October 2008 10:39 Go to previous messageGo to next message
Michel Cadot
Messages: 68666
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
How do you know it is too high if you don't know the unit?

There are 2 time columns in theview, which one are you refering?

Regards
Michel
Re: what is the unit time in oracle?? [message #353019 is a reply to message #353009] Fri, 10 October 2008 11:10 Go to previous messageGo to next message
davidepmc
Messages: 3
Registered: October 2008
Junior Member
I use a script which make a sum of both columns: wait_time & time_waited.

This is correct or the script that i vave is unuseful??

Thanks!
Re: what is the unit time in oracle?? [message #353026 is a reply to message #353019] Fri, 10 October 2008 11:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68666
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Why people are so reluctant to post what they use?
Simply post the script and we will see what it does.

Regards
Michel
Re: what is the unit time in oracle?? [message #353028 is a reply to message #353009] Fri, 10 October 2008 12:08 Go to previous message
davidepmc
Messages: 3
Registered: October 2008
Junior Member
Sorry,

here is the script:
SET ECHO OFF
ALTER SESSION SET nls_language='English';
SET LINES 128
BREAK ON yw SKIP 2 ON dy SKIP 1
COMPUTE SUM of ttl_wait_time ON yw
--
COL yw NOPRINT
COL dy NOPRINT
COL day           FOR A18
COL object_name   FOR A25 TRUNC
COL object_type   FOR A5  TRUNC HEAD TYPE
COL event         FOR A35
COL wait_class    FOR A13
COL ttl_wait_time FOR 999,999,999,990
--
SELECT TO_CHAR(h.sample_time, 'YYYYIW')       yw,
       TO_CHAR(h.sample_time, 'MMDD')   dy,
       TO_CHAR(h.sample_time, 'DY DD_MON_YYYY')  day,
       o.object_name,
       o.object_type,
       h.event,
       e.wait_class,
       SUM(h.wait_time +
           h.time_waited) ttl_wait_time
  FROM 
       dba_hist_active_sess_history h,
       dba_objects                  o,
       v$system_event               e
 WHERE 
       h.current_obj#   = o.object_id
   AND h.event LIKE 'enq%'
   AND e.event   = h.event
HAVING
       SUM(h.wait_time + h.time_waited)>100000
 GROUP 
    BY TO_CHAR(h.sample_time, 'YYYYIW'),
       TO_CHAR(h.sample_time, 'MMDD'),
       TO_CHAR(h.sample_time, 'DY DD_MON_YYYY'),
       o.object_name, o.object_type, h.event, e.wait_class
 ORDER
    BY TO_CHAR(h.sample_time, 'YYYYIW'),
       TO_CHAR(h.sample_time, 'MMDD'),
       SUM(h.wait_time + h.time_waited) DESC
/
--
CLEAR COLUMNS
SET ECHO ON


[Edit MC: add code tags to format your code]

[Updated on: Fri, 10 October 2008 12:31] by Moderator

Report message to a moderator

Previous Topic: undo_retention
Next Topic: from where does V$Parameter get data from?
Goto Forum:
  


Current Time: Mon Jul 08 00:25:49 CDT 2024