1. 程式人生 > >v$sql,v$sqlarea,v$sqltext 和 v$sql_plan 說明

v$sql,v$sqlarea,v$sqltext 和 v$sql_plan 說明

. 先看官網對這幾個檢視的說明(ORACLE 11gR2

1.1 V$SQL

V$SQL lists statistics on shared SQL areas without the GROUP BYclause 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.

Column

Datatype

Description

SQL_TEXT

VARCHAR2(1000)

First thousand characters of the SQL text for the current cursor

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

相關推薦

v$sql,v$sqlarea,v$sqltext v$sql_plan 說明

一. 先看官網對這幾個檢視的說明(ORACLE 11gR2) 1.1 V$SQL V$SQL lists statistics on shared SQL areas without t

v$sql v$sqlarea v$sqltext

三大SQL性能視圖這裏做個筆記,純屬是加深印象: V$SQL lists statistics on shared SQL areas without the GROUP BY clause and contains one row for each child of the original SQL tex

Oracle v$sql,v$sqlarea,v$sqltext區別

v$sqltext中有記憶體中完整的sql語句(SQL被分割為多行儲存),而其他兩個檢視都是部分sql語句。但v$sqltext中儲存的比較簡單,沒有該語句的統計資訊,比如執行次數等。 v$sqltext 的欄位如下:  ADDRESS    &

v$sqlarea v$sql 多版本子游標

select nvl(max(to_number(mingxibh)), 0) as lMaxXuhao from klnl_dkkhmx where dkjiejuh=:1 and farendma=:2 and trim(translate(min

v$sqlv$sqlareav$sqltext有什麼區別

共同點: 1)都儲存了sql內容 2) 記錄的都是位於記憶體中的sql內容

檢視 v$sql,v$sqlarea,$sqltext,v$sqltext_with_newlines 的差異

      檢視v$sql,v$sqlarea,v$sqltext,v$sqltext_with_newlines 是幾個經常容易混淆的檢視,主要是提供library cache中當前快取的sql語句的資訊。這幾個檢視都可以提供當前有關sql語句的具體資訊,但稍有差異。本文主

oracle sql資源消耗相關檢視:v$sql,v$sqlarea,v$sqltext

今天要驗證一個Full table scan問題的patch,需要分析一下sql執行情況,用到了v$sqlarea檢視,感覺這篇文章講得挺明白,摘抄一部分做個讀書筆記。 1       常用檢視說明 Oracle sql語句資源消耗監控,最常用的系統檢視有: v$sql

V$SQLV$SQLAREA

def lte color ech dap wait resolv users select SYS@newtest>DESC V$SQL名稱 是否為空? 類型 SQL_TEXT

v$sql——儲存的是具體的SQL語句執行計劃相關資訊!

如果知道了session的sid就可以找到當前session正在執行的sql: SQL> select sql_text,fetches,executions,parse_calls,disk_reads,cpu_time,elapsed_time from v$s

v-modelv-bind的區別

som 實現 表單 some rdquo 雙向 情況 blank 如果 VUE學習篇1 Mustache (雙大括號寫法)不能在 HTML 屬性中使用,應使用 v-bind 指令: <div v-bind:id="dynamicId"></div&

vue methodscomputed,v-showv-if

循環 求值 因此 一次 -s value compute 結果 事件監聽 方法(method)和計算屬性(computed)區別 每當觸發重新渲染時,調用方法將總會再次執行函數。 計算屬性是基於它們的依賴進行緩存的。計算屬性只有在它的相關依賴發生改變時才會重新求值。多次

基於成本的優化--CBO-------v$SQL視圖

V$SQL 優化 SQL語句 詳解v$SQL視圖 查詢消耗磁盤I/O最多的SQL語句 select sql_text,executions,disk_reads from v$sql where disk_reads>&number order by di

vue中得v-ifv-show

一般來說 運行 什麽 事件 例子 基於 表達 過程 bind 1.兩者的區別  v-if vs v-show v-if 是“真正”的條件渲染,因為它會確保在切換過程中條件塊內的事件監聽器和子組件適當地被銷毀和重建。 v-if 也是惰性的:如果在初始

Oracle V$SESSION_EVENT V$SYSTEM_EVENT

V$SESSION_EVENT 和 V$SYSTEM_EVENT    V$SESSION 及 V$SESSION_WAIT 檢視記錄了活動會話當前正在發生的等待 , 但 是 要 知 道 一 個 活 動 會 話 在 其 生 命 周 期 只 能 可 能 經 歷 很 多 等

v-forv-once的用法

<template> <div id="app"> <h1>Hello Vuex</h1> <p>{{aaa}}</p> <button @click="ad

v-cloak、v-textv-html的異同

同: 在網速慢的情況下,頁面會顯示{{xx}},然後等到解析完成後,才會改變成相應的資料; 所以使用這三種指令都可以防止插值表示式的閃爍; [v-clock] { display:none } <p v-cloak>{{msg}}</p> 其中 v-clo

Vue指令中的v-htmlv-text

vue預設會把資料當成一個字串進行分析,而不會對其中的dom節點進行分析。採用v-html可以讓vue對dom的節點進行分析,如果要求不對dom節點進行分析的,可以採用v-text,或者什麼也不寫 程式碼如下: <div id="app"> <p>{{htm

Vuetify筆記(3):v-btn按鈕v-text-field文字

1、v-btn按鈕      在UI元件中v-btn元件是用一個material design主題和多個選項來替換標準的html按鈕。任何色彩輔助類都可以用來改變背景或文字的顏色。 v-btn按鈕常用屬性: (1)flat:移除按鈕的背景色,布林值型別,預設

Vuetify筆記(2):柵格下v-layoutv-flex

      Vuetify擁有一個12點的柵格系統,它使用flex-box構建,柵格用於佈局應用程式的內容。它包含5種類型的媒體斷點,用於定位特定的螢幕大小或方向。柵格元件的屬性實際上是從它們定義的屬性派生的類,這允許您輕鬆地將這些輔助類指定為屬性,同時仍然提供在任何地

Vue 語法v-show v-if

使用了v-if的時候,如果值為false,那麼頁面將不會有這個html標籤生成。v-show則是不管值為true還是false,html元素都會存在,只是CSS中的displ v-if 是“真正”的條件渲染,因為它會確保在切換過程中條件塊內的事件監聽器和子元件適當地被銷燬和重建。