top of page
  • Writer's picturekyle Hailey

Oracle time units in V$ views

Oracle has a crazy mix of units of time in various v$ views

  1. seconds

  2. centi-seconds

  3. milliseconds

  4. microseconds

Some are straight forward such as time_waited_micro, but what unit is “TIME_WAITED”  or “WAIT_TIME” in? For example

v$session WAIT_TIME –  centi SECONDS_IN_WAIT – seconds

v$session_wait WAIT_TIME – centi SECONDS_IN_WAIT – seconds

v$system_event TIME_WAITED – centi AVERAGE_WAIT – centi TIME_WAITED_MICRO – micro

v$system_wait_class TIME_WAITED – centi

v$eventmetric TIME_WAITED – centi

v$waitclassmetric DBTIME_IN_WAIT – “percentage of the measured wait time that was actually in foregrounds and therefore part of DB time” * TIME_WAITED – centi

v$waitclassmetric_history DBTIME_IN_WAIT – “percentage of the measured wait time that was actually in foregrounds and therefore part of DB time” * TIME_WAITED – centi

dba_hist_system_event TIME_WAITED_MICRO – micro

v$active_session_history WAIT_TIME –  micro, not for general use TIME_WAITED – micro, only the last sample is fixed up, the others will have TIME_WAITED=0*

dba_hist_active_sess_history WAIT_TIME –  micro , not for general use TIME_WAITED = micro

v$session_wait_history

WAIT_TIME  – centi WAIT_TIME_MICRO  –  micro, 11g only TIME_SINCE_LAST_WAIT_MICRO – micro, 11g only

in 10g, v$session_wait_history is pretty worthless IMO as one of the best uses of it would be to find average wait times for events, and even histograms of wait times and better yet,  correlating I/O sizes with I/O times, but alas as most interesting operations are in the micro to millisecond times and wait_time is in centi, most of the interesting data is lost, luckily this is fixed in 11g

With the list in one place it looks like everything is centi unless otherwise stated except for ASH  which is micro.

Please correct and/or add other examples to this list – thanks

* thanks to John Beresniewicz for this info.

1 view0 comments

Recent Posts

See All

留言


bottom of page