V$MYSTAT、V$SESSTAT、V$SYSSTAT、V$STATNAME

官方解釋:

V$MYSTAT

V$MYSTAT contains statistics on the current session.

Column Datatype Description
SID NUMBER ID of the current session
STATISTIC# NUMBER Number of the statistic
VALUE NUMBER Value of the statistic

V$MYSTAT視圖存放了當前會話的一些統計信息, 一般會用該視圖查看當前會話的ID,也就是SID列;

該視圖和另外三個視圖有關聯性:V$SESSTAT 、V$SYSSTAT、V$STATNAME

V$SESSTAT

V$SESSTAT displays user session statistics. To find the name of the statistic associated with each statistic number (STATISTIC#), query the V$STATNAME view.

Column Datatype Description
SID NUMBER Session identifier
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.

VALUE NUMBER Statistic value

該視圖顯示所有會話的統計


V$SYSSTAT

V$SYSSTAT displays system statistics. To find the name of the statistic associated with each statistic number (STATISTIC#), query the V$STATNAME view.

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) Statistic name. You can get a complete listing of statistic names by querying the V$STATNAMEview.
CLASS NUMBER A number representing one or more statistics class. The following class numbers are additive:
  • 1 - User

  • 2 - Redo

  • 4 - Enqueue

  • 8 - Cache

  • 16 - OS

  • 32 - Real Application Clusters

  • 64 - SQL

  • 128 - Debug

VALUE NUMBER Statistic value
STAT_ID NUMBER Identifier of the statistic

該視圖顯示系統的一些統計

V$STATNAME

V$STATNAME 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) Statistic name
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

該視圖存放了一個STATISTIC# 所對應的名稱列表,上面三個視圖都可以用STATISTIC# 這一列關聯取出相應的名稱;

發佈了151 篇原創文章 · 獲贊 45 · 訪問量 25萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章