Oracle v$sql,v$sqlarea,v$sqltext 和 v$sql_plan 字段说明(更新中)

下面仅仅是对 v$sql, v$sqlarea, v$sqltextv$sql_plan 表字段做一些解释说明,我会将官网原文、中文翻译已经个人(小白)的理解,如存在理解有误,请指出评论,也会在空闲之余进行修改。

1,v$sql

1.1 简要说明

原文:v$sql lists statistics on shared SQL areas without the GROUP BY clause and contains one row for each child of the original SQL text entered. Statistics displayed in V$SQL are normally updated at the end of query execution. However, for long running queries, they are updated every 5 seconds. This makes it easy to see the impact of long running SQL statements while they are still in progress.

理解:v$sql 表中的数据是没有GROUP BY子句的共享SQL区域的统计信息,并为输入的原始SQL文本的每个子文本包含一行。v$sql 中统计的数据通常在查询执行结束后进行更新。但是,对于长时间运行的查询,它们每5秒更新一次。这使得在长时间运行的SQL语句仍在进行时就可以很容易地看到它们的影响。比如一条sql 执行时间15秒,但是在执行了5秒、10秒以及15秒的时候就会将执行情况更新到 v$sql表中。

1.2 字段说明

Cloumn(列名) DataType(数据类型) Description(原文描述) 描述翻译 个人理解
SQL_TEXT VARCHAR2(1000) First thousand characters of the SQL text for the current cursor 1 2
SQL_FULLTEXT CLOB Full text for the SQL statement exposed as a CLOB column. The full text of a SQL statement can be retrieved using this column instead of joining with the V$SQLTEXT dynamic performance view.
SQL_ID VARCHAR2(13) SQL identifier of the parent cursor in the library cache
SHARABLE_MEM NUMBER Amount of shared memory used by the child cursor (in bytes)
PERSISTENT_MEM NUMBER Fixed amount of memory used for the lifetime of the child cursor (in bytes)
RUNTIME_MEM NUMBER Fixed amount of memory required during the execution of the child cursor
SORTS NUMBER Number of sorts that were done for the child cursor
LOADED_VERSIONS NUMBER Indicates whether the context heap is loaded (1) or not (0)
OPEN_VERSIONS NUMBER Indicates whether the child cursor is locked (1) or not (0)
USERS_OPENING NUMBER Number of users executing the statement
FETCHES NUMBER Number of fetches associated with the SQL statement
EXECUTIONS NUMBER Number of executions that took place on this object since it was brought into the library cache
PX_SERVERS_EXECUTIONS NUMBER Total number of executions performed by parallel execution servers (0 when the statement has never been executed in parallel)
END_OF_FETCH_COUNT NUMBER Number of times this cursor was fully executed since the cursor was brought into the library cache. The value of this statistic is not incremented when the cursor is partially executed, either because it failed during the execution or because only the first few rows produced by this cursor are fetched before the cursor is closed or re-executed. By definition, the value of the END_OF_FETCH_COUNT column should be less or equal to the value of the EXECUTIONS column.
USERS_EXECUTING NUMBER Number of users executing the statement
LOADS NUMBER Number of times the object was either loaded or reloaded
FIRST_LOAD_TIME VARCHAR2(19) Timestamp of the parent creation time
INVALIDATIONS NUMBER Number of times this child cursor has been invalidated
PARSE_CALLS NUMBER Number of parse calls for this child cursor
DISK_READS NUMBER Number of disk reads for this child cursor
DIRECT_WRITES NUMBER Number of direct writes for this child cursor
BUFFER_GETS NUMBER Number of buffer gets for this child cursor
APPLICATION_WAIT_TIME NUMBER Application wait time (in microseconds)
CONCURRENCY_WAIT_TIME NUMBER Concurrency wait time (in microseconds)
CLUSTER_WAIT_TIME NUMBER Cluster wait time (in microseconds)
USER_IO_WAIT_TIME NUMBER User I/O Wait Time (in microseconds)
PLSQL_EXEC_TIME NUMBER PL/SQL execution time (in microseconds)
JAVA_EXEC_TIME NUMBER Java execution time (in microseconds)
ROWS_PROCESSED NUMBER Total number of rows the parsed SQL statement returns
COMMAND_TYPE NUMBER Oracle command type definition
OPTIMIZER_MODE VARCHAR2(10) Mode under which the SQL statement was executed
OPTIMIZER_COST NUMBER Cost of this query given by the optimizer
OPTIMIZER_ENV RAW(2000) Optimizer environment
OPTIMIZER_ENV_HASH_VALUE NUMBER Hash value for the optimizer environment
PARSING_USER_ID NUMBER User ID of the user who originally built this child cursor
PARSING_SCHEMA_ID NUMBER Schema ID that was used to originally build this child cursor
PARSING_SCHEMA_NAME VARCHAR2(30) Schema name that was used to originally build this child cursor
KEPT_VERSIONS NUMBER Indicates whether this child cursor has been marked to be kept pinned in the cache using the DBMS_SHARED_POOL package
ADDRESS RAW(4 | 8) Address of the handle to the parent for this cursor
TYPE_CHK_HEAP RAW(4) Descriptor of the type check heap for this child cursor
HASH_VALUE NUMBER Hash value of the parent statement in the library cache
OLD_HASH_VALUE NUMBER Old SQL hash value
PLAN_HASH_VALUE NUMBER Numeric representation of the SQL plan for this cursor. Comparing one PLAN_HASH_VALUE to another easily identifies whether or not two plans are the same (rather than comparing the two plans line by line).
CHILD_NUMBER NUMBER Number of this child cursor
SERVICE VARCHAR2(64) Service name
SERVICE_HASH NUMBER Hash value for the name listed in the SERVICEcolumn
MODULE VARCHAR2(64) Contains the name of the module that was executing at the time that the SQL statement was first parsed, which is set by calling DBMS_APPLICATION_INFO.SET_MODULE
MODULE_HASH NUMBER Hash value of the module listed in the MODULE column
ACTION VARCHAR2(64) Contains the name of the action that was executing at the time that the SQL statement was first parsed, which is set by calling DBMS_APPLICATION_INFO.SET_ACTION
ACTION_HASH NUMBER Hash value of the action listed in the ACTION column
SERIALIZABLE_ABORTS NUMBER Number of times the transaction failed to serialize, producing ORA-08177 errors, per cursor
OUTLINE_CATEGORY VARCHAR2(64) If an outline was applied during construction of the cursor, then this column displays the category of that outline. Otherwise the column is left blank.
CPU_TIME NUMBER CPU time (in microseconds) used by this cursor for parsing, executing, and fetching
ELAPSED_TIME NUMBER Elapsed time (in microseconds) used by this cursor for parsing, executing, and fetching
OUTLINE_SID NUMBER Outline session identifier
CHILD_ADDRESS RAW(4 | 8) Address of the child cursor
SQLTYPE NUMBER Denotes the version of the SQL language used for this statement
REMOTE VARCHAR2(1) Indicates whether the cursor is remote mapped (Y) or not (N)
OBJECT_STATUS VARCHAR2(19) Status of the cursor:

VALID - Valid, authorized without errors

Valid, authorized without errors

VALID_AUTH_ERROR - Valid, authorized with authorization errors

VALID_COMPILE_ERROR - Valid, authorized with compilation errors

VALID_UNAUTH - Valid, unauthorized

NVALID_UNAUTH - Invalid, unauthorized

INVALID - Invalid, unauthorized but keep the timestamp
LITERAL_HASH_VALUE NUMBER Hash value of the literals which are replaced with system-generated bind variables and are to be matched, when CURSOR_SHARING is used. This is not the hash value for the SQL statement. If CURSOR_SHARING is not used, then the value is 0.
LAST_LOAD_TIME VARCHAR2(19) Time at which the query plan was loaded into the library cache
IS_OBSOLETE VARCHAR2(1) Indicates whether the cursor has become obsolete (Y) or not (N). This can happen if the number of child cursors is too large.
IS_BIND_SENSITIVE VARCHAR2(1) Indicates whether the cursor is bind sensitive (Y) or not (N). A query is considered bind-sensitive if the optimizer peeked at one of its bind variable values when computing predicate selectivities and where a change in a bind variable value may cause the optimizer to generate a different plan.
IS_BIND_AWARE VARCHAR2(1) Indicates whether the cursor is bind aware (Y) or not (N). A query is considered bind-aware if it has been marked to use extended cursor sharing. The query would already have been marked as bind-sensitive.
IS_SHAREABLE VARCHAR2(1) Indicates whether the cursor can be shared (Y) or not (N)
CHILD_LATCH NUMBER Child latch number that is protecting the cursor. This column is obsolete and maintained for backward compatibility.
SQL_PROFILE VARCHAR2(64) SQL profile used for this statement, if any
SQL_PATCH VARCHAR2(30) SQL patch used for this statement, if any
SQL_PLAN_BASELINE VARCHAR2(30) SQL plan baseline used for this statement, if any
PROGRAM_ID NUMBER Program identifier
PROGRAM_LINE# NUMBER Program line number
EXACT_MATCHING_SIGNATURE NUMBER Signature calculated on the normalized SQL text. The normalization includes the removal of white space and the uppercasing of all non-literal strings.
FORCE_MATCHING_SIGNATURE NUMBER Signature used when the CURSOR_SHARING parameter is set to FORCE
LAST_ACTIVE_TIME DATE TIme at which the query plan was last active
BIND_DATA RAW(2000) Bind data
TYPECHECK_MEM NUMBER Typecheck memory
IO_CELL_OFFLOAD_ELIGIBLE_BYTES NUMBER Number of I/O bytes which can be filtered by the Exadata storage system\nSee Also: Oracle Exadata Storage Server Software documentation for more information
IO_INTERCONNECT_BYTES NUMBER Number of I/O bytes exchanged between Oracle Database and the storage system
PHYSICAL_READ_REQUESTS NUMBER Number of physical read I/O requests issued by the monitored SQL
PHYSICAL_READ_BYTES NUMBER Number of bytes read from disks by the monitored SQL
PHYSICAL_WRITE_REQUESTS NUMBER Number of physical write I/O requests issued by the monitored SQL
PHYSICAL_WRITE_BYTES NUMBER Number of bytes written to disks by the monitored SQL
OPTIMIZED_PHY_READ_REQUESTS NUMBER Number of physical read I/O requests from Database Smart Flash Cache issued by the monitored SQL
LOCKED_TOTAL NUMBER Total number of times the child cursor has been locked
PINNED_TOTAL NUMBER Total number of times the child cursor has been pinned
IO_CELL_UNCOMPRESSED_BYTES NUMBER Number of uncompressed bytes (that is, size after decompression) that are offloaded to the Exadata cells
See Also: Oracle Exadata Storage Server Software documentation for more information
IO_CELL_OFFLOAD_RETURNED_BYTES NUMBER Number of bytes that are returned by the Exadata cell for smart scan only (that is, not including bytes for other database I/O)
See Also: Oracle Exadata Storage Server Software documentation for more information

参考文章: vsql,vsqlarea,vsqltext 和 vsql_plan 说明_51CTO博客_oracle v$sqltext

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 212,686评论 6 492
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,668评论 3 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 158,160评论 0 348
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,736评论 1 284
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,847评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,043评论 1 291
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,129评论 3 410
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,872评论 0 268
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,318评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,645评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,777评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,470评论 4 333
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,126评论 3 317
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,861评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,095评论 1 267
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,589评论 2 362
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,687评论 2 351

推荐阅读更多精彩内容