Oracle 视图 V$EVENT_HISTOGRAM 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图V$EVENT_HISTOGRAM显示系统事件统计结果,保存着从数据库实例启动到结束的采样结果。V$EVENT_HISTOGRAM基本按照stats_begin和end_time排序,stats_begin为采样开始时间,而END_TIME是采样结束时间。
根据采样的历史事件统计数据,我们可分析SGA的事件统计信息,从而评估数据库的性能。通常我们可以查询一段时间内占用最多CPU资源的事件类型,以及系统因为这些事件类型而等待的时间等情况。
使用V$EVENT_HISTOGRAM视图,可以非常方便地查看最耗时的事件类型,以及等待时间。可以使用以下SQL语句来查询:
SELECT event_id, event_name, sample_time, wait_time FROM v$event_histogram WHERE wait_time > 0;
官方英文解释
V$EVENT_HISTOGRAM
displays a histogram of the number of waits, the maximum wait, and total wait time on an event basis, in milliseconds. The histogram has buckets of time intervals from < 1 ms, < 2 ms, < 4 ms, < 8 ms, … < 221 ms, < 222 ms, and >= 222 ms.
The histogram will not be filled unless the TIMED_STATISTICS
initialization parameter is set to true
.
Column | Datatype | Description |
---|---|---|
|
|
Event number |
|
|
Name of the event |
|
|
Amount of time the bucket represents (in milliseconds). If the duration = |
|
|
Number of waits of the duration belonging to the bucket of the histogram |
|
|
Indicates the last time the bucket was updated (the ending timestamp of the last wait falling into the bucket’s duration) |
|
|
The ID of the container to which the data pertains. Possible values include:
|
See Also:
“TIMED_STATISTICS”