性能诊断与调优之V$--V$EVENT_NAME
2012-06-08 11:20
190 查看
V$EVENT_NAME view
Contrary to its naming convention, V$EVENT_NAME is not a dynamic V$ view.The information it provides does not change over time. It is a referenceview that contains all the wait events defined for
your database instance.The number of wait events varies from version to version and is also dependent on theOracle options that are installed. Upon its introduction in Oracle Release7.0.12, there
were less than 100 wait events. Oracle Release 7.3.4contained a little more than 100 wait events. Oracle8i Database had over200 wait events, while Oracle9i Database has about 400. There are over 800wait events in Oracle Database 10g Release 1. But don’t let
these numbersoverwhelm you. You need to familiarize yourself with only a handful ofcommon wait events, and they normally cover 80 to 90 percent of yourtroubleshooting needs. You are not expected to know all of them, but youdo need to know where to find them.
这个视图虽然看似叫动态性能视图,其实它里面的记录永远不会改变,它包括实例的所有事件,随着oracle不同版本的发布,事件越来越多,到10g已经有800多个事件了,但是只需要你熟悉少量的一般事件,就能够进行80%至90%问题诊断。
How to Use V$EVENT_NAME View
This is where you will discover the number of events that Oracle has defined for your database. If you do not yet know, we suggest you run aquick COUNT (*) against this view.
If you ever forget the exact spelling of an event name, you will find the answer in this view. An event name can change between versions. An example is the null event, which is spelled as “Null event” in versions
up to Oracle8iDatabase and spelled as “null event” thereafter. The column EVENT# is a unique number for the event. This number can change from one Oracle version to another for the same wait event because of the way it is built by the compile time macros in
the Oracle code. Forbetter stability, Oracle Database 10g Release 1 includes the EVENT_ID column, which contains a hash number that is based on the event name. The hash value will remain the same across versionsfor as long as the event name does not change.
The column NAME contains the wait event name. Each wait event can have up to three attributes that are recorded in the PARAMETER1, PARAMETER2, and PARAMETER3columns, respectively. These
attributes give specific information about the wait eventeach time it occurs. You can list all the events and their attributes fromV$EVENT_NAME view using the following query:
列EVENT#:是一个唯一的事件编号,但随着不同的版本,同一事件的编号可能会变;列EVENT_ID:是依赖事件名称而计算出的一个hash值,所以只要事件名不变,在不同的版本中该列的值也是不会变的。
The text of PARAMETER1,PARAMETER2, and PARAMETER3 of each event are also displayed in the P1TEXT, P2TEXT,and P3TEXT columns in the V$SESSION_WAIT view whenever a session
waits on the event. The actualvalues for these parameters are shown in P1, P2, and P3 columns of the V$SESSION_WAIT view.
The WAIT_CLASS_ID, WAIT_CLASS#, andWAIT_CLASS columns are added to the V$EVENT_NAME view in Oracle Database10g Release 1 to group wait events by class or category, such
as User I/O, Network, Concurrency,etc.
TheWAIT_CLASS_ID contains the hash value of the wait class name; it willremain the same from version to version as long as the name of the waitclass does not change.
The columnWAIT_CLASS# contains a uniquenumber for the WAIT_CLASS. Just like the EVENT#, it may change fromversion to version.
The column WAIT_CLASS contains theactual name of the wait event class. There are 12 classes of waitevents in Oracle Database 10g Release 1 as shown next:
上面的内容解释了视图中的各列的描述,有的是在后续不同的版本中添加进来的。
Contrary to its naming convention, V$EVENT_NAME is not a dynamic V$ view.The information it provides does not change over time. It is a referenceview that contains all the wait events defined for
your database instance.The number of wait events varies from version to version and is also dependent on theOracle options that are installed. Upon its introduction in Oracle Release7.0.12, there
were less than 100 wait events. Oracle Release 7.3.4contained a little more than 100 wait events. Oracle8i Database had over200 wait events, while Oracle9i Database has about 400. There are over 800wait events in Oracle Database 10g Release 1. But don’t let
these numbersoverwhelm you. You need to familiarize yourself with only a handful ofcommon wait events, and they normally cover 80 to 90 percent of yourtroubleshooting needs. You are not expected to know all of them, but youdo need to know where to find them.
这个视图虽然看似叫动态性能视图,其实它里面的记录永远不会改变,它包括实例的所有事件,随着oracle不同版本的发布,事件越来越多,到10g已经有800多个事件了,但是只需要你熟悉少量的一般事件,就能够进行80%至90%问题诊断。
V$EVENT_NAME view has the following columns: SQL> desc v$event_name Name Type Nullable Default Comments ------------- ------------ -------- ------- -------- EVENT# NUMBER Y EVENT_ID NUMBER Y NAME VARCHAR2(64) Y PARAMETER1 VARCHAR2(64) Y PARAMETER2 VARCHAR2(64) Y PARAMETER3 VARCHAR2(64) Y WAIT_CLASS_ID NUMBER Y Starting Oracle10g WAIT_CLASS# NUMBER Y Starting Oracle10g WAIT_CLASS VARCHAR2(64) Y Starting Oracle10g
How to Use V$EVENT_NAME View
This is where you will discover the number of events that Oracle has defined for your database. If you do not yet know, we suggest you run aquick COUNT (*) against this view.
If you ever forget the exact spelling of an event name, you will find the answer in this view. An event name can change between versions. An example is the null event, which is spelled as “Null event” in versions
up to Oracle8iDatabase and spelled as “null event” thereafter. The column EVENT# is a unique number for the event. This number can change from one Oracle version to another for the same wait event because of the way it is built by the compile time macros in
the Oracle code. Forbetter stability, Oracle Database 10g Release 1 includes the EVENT_ID column, which contains a hash number that is based on the event name. The hash value will remain the same across versionsfor as long as the event name does not change.
The column NAME contains the wait event name. Each wait event can have up to three attributes that are recorded in the PARAMETER1, PARAMETER2, and PARAMETER3columns, respectively. These
attributes give specific information about the wait eventeach time it occurs. You can list all the events and their attributes fromV$EVENT_NAME view using the following query:
列EVENT#:是一个唯一的事件编号,但随着不同的版本,同一事件的编号可能会变;列EVENT_ID:是依赖事件名称而计算出的一个hash值,所以只要事件名不变,在不同的版本中该列的值也是不会变的。
select event#,name, parameter1, parameter2, parameter3 from v$event_name order by name;
The text of PARAMETER1,PARAMETER2, and PARAMETER3 of each event are also displayed in the P1TEXT, P2TEXT,and P3TEXT columns in the V$SESSION_WAIT view whenever a session
waits on the event. The actualvalues for these parameters are shown in P1, P2, and P3 columns of the V$SESSION_WAIT view.
The WAIT_CLASS_ID, WAIT_CLASS#, andWAIT_CLASS columns are added to the V$EVENT_NAME view in Oracle Database10g Release 1 to group wait events by class or category, such
as User I/O, Network, Concurrency,etc.
TheWAIT_CLASS_ID contains the hash value of the wait class name; it willremain the same from version to version as long as the name of the waitclass does not change.
The columnWAIT_CLASS# contains a uniquenumber for the WAIT_CLASS. Just like the EVENT#, it may change fromversion to version.
The column WAIT_CLASS contains theactual name of the wait event class. There are 12 classes of waitevents in Oracle Database 10g Release 1 as shown next:
select wait_class#, wait_class_id, wait_class from v$event_name group by wait_class#, wait_class_id, wait_class; WAIT_CLASS# WAIT_CLASS_ID WAIT_CLASS ----------- ------------- --------------------------------------------- 0 1893977003 Other 1 4217450380 Application 2 3290255840 Configuration 3 4166625743 Administrative 4 3875070507 Concurrency 5 3386400367 Commit 6 2723168908 Idle 7 2000153315 Network 8 1740759767 User I/O 9 4108307767 System I/O 10 2396326234 Scheduler 11 3871361733 Cluster
上面的内容解释了视图中的各列的描述,有的是在后续不同的版本中添加进来的。
相关文章推荐
- 性能诊断与调优之V$--V$SESSION_EVENT
- Mongodb语句性能诊断、调优tuning
- JAVA性能诊断与调优
- Oracle性能诊断与调优
- 【原创】构建高性能ASP.NET站点 第六章—性能瓶颈诊断与初步调优(下前篇)—简单的优化措施
- 【原创】构建高性能ASP.NET站点 第六章—性能瓶颈诊断与初步调优(下后篇)—减少不必要的请求
- 性能诊断与调优之V$--V$SESSION_WAIT_CLASS
- 【原创】构建高性能ASP.NET站点 第六章—性能瓶颈诊断与初步调优(下后篇)—减少不必要的请求
- Linux 性能调优,网络开发,系统诊断常用命令总结
- DB2 最佳实践: 性能调优和问题诊断最佳实践
- JAVA性能诊断与调优
- WebSphere性能诊断与调优资料汇总
- Oracle 性能诊断和调优 (不断更新……)
- DB2 最佳实践: 性能调优和问题诊断最佳实践,第 2 部分
- WebSphere性能诊断与调优
- 以淘宝商品搜索漫谈查询条件的排序对效率的影响(SQL查询性能优化,附调优(性能诊断)DMV)
- Oracle 性能诊断和调优 (不断更新……)
- 以淘宝商品搜索漫谈查询条件的排序对效率的影响(SQL查询性能优化,附调优(性能诊断)DMV)
- Linux性能诊断与调优
- MySQL性能诊断与调优 转