runstats相关

V$STATNAME

显示 V$SESSTAT V$SYSSTAT 表中的统计信息名称

This view displays decoded statistic names for the statistics shown in the V$SESSTAT and V$SYSSTAT tables.

On some platforms, the NAME and CLASS columns contain additional operating system-specific statistics.

Column

Datatype

Description

STATISTIC#

NUMBER

Statistic number ( 统计编号 )

Note: Statistics numbers are not guaranteed to remain constant from one release to another. Therefore, you should rely on the statistics name rather than its number in your applications.

NAME

VARCHAR2(64)

统计名

CLASS

NUMBER

A number representing one or more statistics classes. The following class numbers are additive:

  • 1 - User

  • 2 - Redo

  • 4 - Enqueue

  • 8 - Cache

  • 16 - OS

  • 32 - Real Application Clusters

  • 64 - SQL

  • 128 - Debug

STAT_ID

NUMBER

Identifier of the statistic ( 统计标识符 )

V$MYSTAT

显示当前 session 的统计信息

Column

Datatype

Description

SID

NUMBER

当前 session ID

STATISTIC#

NUMBER

统计编号

VALUE

NUMBER

统计值

-- 显示当前session 的统计信息

SELECT 'STAT...' || a.NAME NAME, b.VALUE

FROM v$statname a, v$mystat b

WHERE a.STATISTIC# = b.STATISTIC#

V$LATCH

显示总的以 latch 名称分组的 latch 统计信息,包括父 latch 与子 latch, 单独的父 latch 与子 latch 统计信息分别在 V$LATCH_PARENT , V$LATCH_CHILDREN 视图

V$LATCH shows aggregate latch statistics for both parent and child latches, grouped by latch name. Individual parent and child latch statistics are broken down in the views V$LATCH_PARENT and V$LATCH_CHILDREN .

Column

Datatype

Description

ADDR

RAW(4 | 8)

Address of the latch object

LATCH#

NUMBER

Latch number

LEVEL#

NUMBER

Latch level

NAME

VARCHAR2(50)

Latch name

HASH

NUMBER

Latch hash

GETS

NUMBER

Number of times the latch was requested in willing-to-wait mode latch 被请求的次数

MISSES

NUMBER

Number of times the latch was requested in willing-to-wait mode and the requestor had to wait

SLEEPS

NUMBER

Number of times a willing-to-wait latch request resulted in a session sleeping while waiting for the latch

IMMEDIATE_GETS

NUMBER

Number of times a latch was requested in no-wait mode

IMMEDIATE_MISSES

NUMBER

Number of times a no-wait latch request did not succeed (that is, missed)

WAITERS_WOKEN

NUMBER

This column has been deprecated and is present only for compatibility with previous releases of Oracle. No data is accumulated for this column; it will always have a value of zero.

WAITS_HOLDING_LATCH

NUMBER

This column has been deprecated and is present only for compatibility with previous releases of Oracle. No data is accumulated for this column; it will always have a value of zero.

SPIN_GETS

NUMBER

Willing-to-wait latch requests which missed the first try but succeeded while spinning

SLEEP[1 | 2 | 3]

NUMBER

These columns have been deprecated and are present only for compatibility with previous releases of Oracle. No data is accumulated for these columns; they will always have a value of zero. As a substitute for this column you can query the appropriate rows of the V$EVENT_HISTOGRAM view where the EVENT column has a value of latch free or latch:% .

SLEEP4

NUMBER

This column has been deprecated and is present only for compatibility with previous releases of Oracle. No data is accumulated for this column; it will always have a value of zero. As a substitute for this column you can query the appropriate rows of the V$EVENT_HISTOGRAM view where the EVENT column has a value of latch free or latch:% .

SLEEP[5 | 6 | 7 | 8 | 9 | 10 | 11]

NUMBER

These columns have been deprecated and are present only for compatibility with previous releases of Oracle. No data is accumulated for these columns.

WAIT_TIME

NUMBER

Elapsed time spent waiting for the latch (in microseconds)

$TIMER

This view lists the elapsed time in hundredths of seconds. Time is measured since the beginning of the epoch, which is operating system specific, and wraps around to 0 again whenever the value overflows four bytes (roughly 497 days).

Column

Datatype

Description

HSECS

NUMBER

Elapsed time in hundredths of a second

DBMS_UTILITY

GET_TIME Function

This function determines the current time in 100th's of a second. This subprogram is primarily used for determining elapsed time. The subprogram is called twice – at the beginning and end of some process – and then the first (earlier) number is subtracted from the second (later) number to determine the time elapsed.

Syntax

DBMS_UTILITY.GET_TIME

RETURN NUMBER;

Return Values

Time is the number of 100th's of a second from the point in time at which the subprogram is invoked.

Usage Notes

Numbers are returned in the range -2147483648 to 2147483647 depending on platform and machine, and your application must take the sign of the number into account in determining the interval. For instance, in the case of two negative numbers, application logic must allow that the first (earlier) number will be larger than the second (later) number which is closer to zero. By the same token, your application should also allow that the first (earlier) number be negative and the second (later) number be positive.

GET_CPU_TIME Function

This function returns the current CPU time in 100th's of a second. The returned CPU time is the number of 100th's of a second from some arbitrary epoch.

Syntax

DBMS_UTILITY.GET_CPU_TIME

RETURN NUMBER;

Return Values

Time is the number of 100th's of a second from some arbitrary epoch.

你可能感兴趣的:(run)