暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

What is the unit used in the time-related columns of the v$views

2011-01-01
535

The Oracle (tm) Users' Co-Operative FAQ

What is the time unit used in the v$ views ?


Author's name: Jonathan Lewis

Author's Email: Jonathan@jlcomp.demon.co.uk

Date written: 15th Dec 2002

Oracle version(s): 7 - 9

What is the time unit used in the v$ views ?


In general the answer is hundredths of a second.

However, there are a few exceptions (and possibly a few platform-specific oddities).

In Oracle 9, the view v$enqueue_stat has been introduced to expose the number of enqueues (locks) that have been requested. The view includes the number of requests, waits, successful acquisitions, and failures. It also includes the time spent waiting - measured in milliseconds. (Humour point - according to some coder in Oracle Corp, there are 1024 milliseconds in a second; check the length of a one-second wait in the dbms_lock.sleep procedure, if you don't believe me).

In late versions of Oracle 8.1, Oracle started recording time in v$session_wait, v$session_event, and v$system_event (or at least the underlying X$ objects) in micro seconds. However, the micro second time is not always exposed - some views have a column time_waited_micro, some only have the time_waited where the value is rounded to the hundredth.

This does lead to some oddities in trace files, where you may find the elapsed time of an action recorded to the micro second, but the corresponding CPU time rounded to the hundredth, with the effect that the CPU time will sometimes be much larger than the elapsed time.


Further reading: FAQ: Is there a way to suspend a task, or make it sleep, for a period of time ?



最后修改时间:2020-04-16 15:11:52
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论