显示 V$SESSTAT 和 V$SYSSTAT表中的统计信息名称
Thisview displays decoded statistic names for the statistics shown inthe V$SESSTAT and V$SYSSTAT tables.
Onsome platforms, the NAME and CLASS columnscontain additional operating system-specific statistics.
Column | Datatype | Description |
STATISTIC# | NUMBER | Statisticnumber (统计编号) Note: Statisticsnumbers are not guaranteed to remain constant from one release toanother. Therefore, you should rely on the statistics name ratherthan its number in your applications. |
NAME | VARCHAR2(64) | 统计名 |
CLASS | NUMBER | Anumber representing one or more statistics classes. The followingclass numbers are additive:
|
STAT_ID | NUMBER | Identifierof the statistic (统计标识符) |
显示当前session的统计信息
Column | Datatype | Description |
SID | NUMBER | 当前sessionID |
STATISTIC# | NUMBER | 统计编号 |
VALUE | NUMBER | 统计值 |
--显示当前session的统计信息
SELECT'STAT...' || a.NAME NAME, b.VALUE
FROMv$statname a, v$mystat b
WHEREa.STATISTIC# = b.STATISTIC#
显示总的以latch名称分组的latch统计信息,包括父latch与子latch,单独的父latch与子latch统计信息分别在 V$LATCH_PARENT ,V$LATCH_CHILDREN视图
V$LATCH showsaggregate latch statistics for both parent and child latches, groupedby latch name. Individual parent and child latch statistics arebroken down in the views V$LATCH_PARENT and V$LATCH_CHILDREN.
Column | Datatype | Description |
ADDR | RAW(4| 8) | Addressof the latch object |
LATCH# | NUMBER | Latchnumber |
LEVEL# | NUMBER | Latchlevel |
NAME | VARCHAR2(50) | Latchname |
HASH | NUMBER | Latchhash |
GETS | NUMBER | Numberof times the latch was requested in willing-to-wait modelatch被请求的次数 |
MISSES | NUMBER | Numberof times the latch was requested in willing-to-wait mode and therequestor had to wait |
SLEEPS | NUMBER | Numberof times a willing-to-wait latch request resulted in a sessionsleeping while waiting for the latch |
IMMEDIATE_GETS | NUMBER | Numberof times a latch was requested in no-wait mode |
IMMEDIATE_MISSES | NUMBER | Numberof times a no-wait latch request did not succeed (that is,missed) |
WAITERS_WOKEN | NUMBER | Thiscolumn has been deprecated and is present only for compatibilitywith previous releases of Oracle. No data is accumulated for thiscolumn; it will always have a value of zero. |
WAITS_HOLDING_LATCH | NUMBER | Thiscolumn has been deprecated and is present only for compatibilitywith previous releases of Oracle. No data is accumulated for thiscolumn; it will always have a value of zero. |
SPIN_GETS | NUMBER | Willing-to-waitlatch requests which missed the first try but succeeded whilespinning |
SLEEP[1| 2 | 3] | NUMBER | Thesecolumns have been deprecated and are present only forcompatibility with previous releases of Oracle. No data isaccumulated for these columns; they will always have a value ofzero. As a substitute for this column you can query theappropriate rows of theV$EVENT_HISTOGRAM viewwhere the EVENT columnhas a value of latchfree or latch:%. |
SLEEP4 | NUMBER | Thiscolumn has been deprecated and is present only for compatibilitywith previous releases of Oracle. No data is accumulated for thiscolumn; it will always have a value of zero. As a substitute forthis column you can query the appropriate rows ofthe V$EVENT_HISTOGRAMviewwhere the EVENT columnhas a value of latchfree or latch:%. |
SLEEP[5| 6 | 7 | 8 | 9 | 10 | 11] | NUMBER | Thesecolumns have been deprecated and are present only forcompatibility with previous releases of Oracle. No data isaccumulated for these columns. |
WAIT_TIME | NUMBER | Elapsedtime spent waiting for the latch (in microseconds) |
Thisview lists the elapsed time in hundredths of seconds. Time ismeasured since the beginning of the epoch, which is operating systemspecific, and wraps around to 0 again whenever the value overflowsfour bytes (roughly 497 days).
Column | Datatype | Description |
HSECS | NUMBER | Elapsedtime in hundredths of a second |
DBMS_UTILITY
GET_TIMEFunction
Thisfunction determines the current time in 100th's of a second. Thissubprogram is primarily used for determining elapsed time. Thesubprogram is called twice – at the beginning and end of someprocess – and then the first (earlier) number is subtracted fromthe second (later) number to determine the time elapsed.
DBMS_UTILITY.GET_TIME
RETURNNUMBER;
Timeis the number of 100th's of a second from the point in time at whichthe subprogram is invoked.
Numbersare returned in the range -2147483648 to 2147483647 depending onplatform and machine, and your application must take the sign of thenumber into account in determining the interval. For instance, in thecase of two negative numbers, application logic must allow that thefirst (earlier) number will be larger than the second (later) numberwhich is closer to zero. By the same token, your application shouldalso allow that the first (earlier) number be negative and the second(later) number be positive.
GET_CPU_TIMEFunction
Thisfunction returns the current CPU time in 100th's of a second. Thereturned CPU time is the number of 100th's of a second from somearbitrary epoch.
DBMS_UTILITY.GET_CPU_TIME
RETURNNUMBER;
Timeis the number of 100th's of a second from some arbitrary epoch.