V$EVENT_HISTOGRAM
已等待为基础,显示等待的次数,最大等待,总等待时间的直方图,单位是毫秒。时间间隔为< 1 ms, < 2 ms, < 4 ms, < 8 ms, ... < 221 ms,< 222 ms, and >= 222 ms。
TIMED_STATISTICS初始化参数设置为true,才会统计直方图。
Column | Datatype | Description |
EVENT# | NUMBER | Event number |
EVENT | VARCHAR2(64) | Name of the Event |
WAIT_TIME_MILLI | NUMBER | Amount of time the bucket represents (in milliseconds). If the duration = num, then this column represents waits of duration < num that are not included in any smaller bucket. |
WAIT_COUNT | NUMBER | Number of waits of the duration belonging to the bucket of the histogram |
LAST_UPDATE_TIME | VARCHAR2(64) | Indicates the last time the bucket was updated (the ending timestamp of the last wait falling into the bucket's duration) |
CON_ID | NUMBER | The ID of the container to which the data pertains. Possible values include: |
列的解释
WAIT_TIME_MILLI:单位毫秒,在这个bucket区间(<num)的直方图。
WAIT_COUNT:在这个bucket区间等待的次数。
LAST_UPDATE_TIME:bucket的最后一次更新时间(最后一次等待落入bucket区间的结束时间戳)。
TIMED_STATISTICS
Property | Description |
Parameter type | Boolean |
Default value | If STATISTICS_LEVEL is set to TYPICAL or ALL, then true |
Modifiable | ALTER SESSION, ALTER SYSTEM |
Modifiable in a PDB | Yes |
Range of values | true | false |
Basic | No |
Values
true
统计信息被收集并存储在跟踪文件中或显示在V$SESSTATS和V$SYSSTATS动态性能视图中。false
所有时间相关统计信息的值设置为零。此设置使Oracle避免了从操作系统请求时间的开销。
更多
从版本11.1.0.7.0开始,如果STATISTICS_LEVEL的值设置为TYPICAL或ALL,则TIMED_STATISTICS参数的值不能设置为false。
在某些具有非常快的定时器访问的系统上,即使将此参数设置为false,Oracle也可能启用定时。在这些系统上,将参数设置为true有时可以为长操作产生更准确的统计信息。
示例:
如下log file sync,大部分等待小于16ms,说明这个是正常的。
EVENT | WAIT_TIME_MILLI | WAIT_COUNT | LAST_UPDATE_TIME |
log file sync | 1 | 2853759659 | 09-5月 -17 03.49.52.456773 下午 +08:00 |
log file sync | 2 | 2460852221 | 09-5月 -17 03.49.52.757307 下午 +08:00 |
log file sync | 4 | 2005459279 | 09-5月 -17 03.49.52.789929 下午 +08:00 |
log file sync | 8 | 1718079553 | 09-5月 -17 03.49.52.783671 下午 +08:00 |
log file sync | 16 | 1135553265 | 09-5月 -17 03.49.52.327942 下午 +08:00 |
log file sync | 32 | 386020063 | 09-5月 -17 03.49.50.334719 下午 +08:00 |
log file sync | 64 | 41530665 | 09-5月 -17 03.49.41.857935 下午 +08:00 |
log file sync | 128 | 1391206 | 09-5月 -17 03.30.04.133470 下午 +08:00 |
log file sync | 256 | 216167 | 09-5月 -17 11.00.01.471816 上午 +08:00 |
log file sync | 512 | 30375 | 08-5月 -17 08.44.50.348928 下午 +08:00 |
log file sync | 1024 | 1170 | 08-5月 -17 08.44.50.349377 下午 +08:00 |
log file sync | 2048 | 2225 | 08-5月 -17 08.44.50.350464 下午 +08:00 |
log file sync | 4096 | 5652 | 08-5月 -17 08.44.50.358355 下午 +08:00 |
log file sync | 8192 | 10919 | 08-5月 -17 08.44.50.361524 下午 +08:00 |
log file sync | 16384 | 13246 | 22-1月 -17 10.39.53.424109 下午 +08:00 |