blog menu1

Important views and Tables

Important views and Tables


 V$SYSAUX_OCCUPANTS -


V$SYSAUX_OCCUPANTS displays SYSAUX tablespace occupant information.


ColumnDatatypeDescription
OCCUPANT_NAMEVARCHAR2(64)Occupant name
OCCUPANT_DESCVARCHAR2(64)Occupant description
SCHEMA_NAMEVARCHAR2(64)Schema name for the occupant
MOVE_PROCEDUREVARCHAR2(64)Name of the move procedure; null if not applicable
MOVE_PROCEDURE_DESCVARCHAR2(64)Description of the move procedure
SPACE_USAGE_KBYTESNUMBERCurrent space usage of the occupant (in KB)



2. V$SYSSTAT-

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


ColumnDatatypeDescription
STATISTIC#NUMBERStatistic 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.
NAMEVARCHAR2(64)Statistic name
CLASSNUMBERA 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
VALUENUMBERStatistic value
STAT_IDNUMBERIdentifier of



3. V$SYSTEM_EVENT


This view contains information on total waits for an event. Note that the TIME_WAITED and AVERAGE_WAIT columns will contain a value of zero on those platforms that do not support a fast timing mechanism. If you are running on one of these platforms and you want this column to reflect true wait times, you must set TIMED_STATISTICS toTRUE in the parameter file; doing this will have a small negative effect on system performance.



ColumnDatatypeDescription
EVENTVARCHAR2(64)Name of the wait event
TOTAL_WAITSNUMBERTotal number of waits for the event
TOTAL_TIMEOUTSNUMBERTotal number of timeouts for the event
TIME_WAITEDNUMBERTotal amount of time waited for the event (in hundredths of a second)
AVERAGE_WAITNUMBERAverage amount of time waited for the event (in hundredths of a second)
TIME_WAITED_MICRONUMBERTotal amount of time waited for the event (in microseconds)
EVENT_IDNUMBERIdentifier of the wait event
WAIT_CLASS_IDNUMBERIdentifier of the class of the wait event
WAIT_CLASS#NUMBERNumber of the class of the wait event
WAIT_CLASSVARCHAR2(64)Name of the class of the wait event


4. V$SYSTEM_PARAMETER displays information about the initialization parameters that are currently in effect for the instance. A new session inherits parameter values from the instance-wide values.


ColumnDatatypeDescription
NUMNUMBERParameter number
NAMEVARCHAR2(80)Name of the parameter
TYPENUMBERParameter type:
  • 1 - Boolean
  • 2 - String
  • 3 - Integer
  • 4 - Parameter file
  • 5 - Reserved
  • 6 - Big integer
VALUEVARCHAR2(512)Instance-wide parameter value
DISPLAY_VALUEVARCHAR2(512)Parameter value in a user-friendly format. For example, if the VALUE column shows the value 262144 for a big integer parameter, then the DISPLAY_VALUE column will show the value 256K.
ISDEFAULTVARCHAR2(9)Indicates whether the parameter is set to the default value (TRUE) or the parameter value was specified in the parameter file (FALSE)
ISSES_MODIFIABLEVARCHAR2(5)Indicates whether the parameter can be changed with ALTER SESSION (TRUE) or not (FALSE)
ISSYS_MODIFIABLEVARCHAR2(9)Indicates whether the parameter can be changed with ALTER SYSTEM and when the change takes effect:
  • IMMEDIATE - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect immediately.
  • DEFERRED - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used to start the instance. The change takes effect in subsequent sessions.
  • FALSE - Parameter cannot be changed with ALTER SYSTEM unless a server parameter file was used to start the instance. The change takes effect in subsequent instances.
ISINSTANCE_MODIFIABLEVARCHAR2(5)For parameters that can be changed with ALTER SYSTEm, indicates whether the value of the parameter can be different for every instance (TRUE) or whether the parameter must have the same value for all Real Application Clusters instances (FALSE). If the ISSYS_MODIFIABLE column is FALSE, then this column is alwaysFALSE.
ISMODIFIEDVARCHAR2(8)Indicates how the parameter was modified. If an ALTER SYSTEM was performed, the value will be MODIFIED.
ISADJUSTEDVARCHAR2(5)Indicates whether Oracle adjusted the input value to a more suitable value (for example, the parameter value should be prime, but the user input a non-prime number, so Oracle adjusted the value to the next prime number)
ISDEPRECATEDVARCHAR2(5)Indicates whether the parameter has been deprecated (TRUE) or not (FALSE)
DESCRIPTIONVARCHAR2(255)Description of the parameter
UPDATE_COMMENTVARCHAR2(255)Comments associated with the most recent update
HASHNUMBERHash value for the parameter namE

5. DBA_BLOCKERS
DBA_BLOCKERS displays a session if it is not waiting for a locked object but is holding a lock on an object for which another session is waiting.

ColumnDatatypeNULLDescription
HOLDING_SESSIONNUMBER
Session holding a lock


6. V$SESS_TIME_MODEL
V$SESS_TIME_MODEL displays the session-accumulated time for various operations. The time reported is the total elapsed or CPU time (in microseconds). Any timed operation will buffer at most 5 seconds of time data. Specifically, this means that if a timed operation (such as SQL execution) takes a long period of time to perform, the data published to this view is at most missing 5 seconds of the time accumulated for the operation.
The time values are 8-byte integers and can therefore hold approximately 580,000 years of time before wrapping. Background process time is not included in a statistic value unless the statistic is specifically for background processes.

ColumnDatatypeDescription
SIDNUMBERSession ID (same as in V$SESSION)
STAT_IDNUMBERStatistic identifier for the time statistic
STAT_NAMEVARCHAR2(64)Name of the statistic (Table 5-4)
VALUENUMBERAmount of time (in microseconds) that the session has spent in this operation
Table 5-4 V$SESS_TIME_MODEL and V$SYS_TIME_MODEL Statistics
Statistic NameDescription
DB TimeAmount of elapsed time (in microseconds) spent performing Database user-level calls. This does not include the time spent on instance background processes such as PMON.
DB CPUAmount of CPU time (in microseconds) spent on database user-level calls. This does not include the CPU time spent on instance background processes such as PMON.
background cputimeAmount of CPU time (in microseconds) consumed by database background processes.
sequence load elapsed timeAmount of elapsed time spent getting the next sequence number from the data dictionary. If a sequence is cached, then this is the amount of time spent replenishing the cache when it runs out. No time is charged when a sequence number is found in the cache. For non-cached sequences, some time will be charged for every nextval call.
parse time elapsedAmount of elapsed time spent parsing SQL statements. It includes both soft and hard parse time.
hard parse elapsed timeAmount of elapsed time spent hard parsing SQL statements.
sql executeelapsed timeAmount of elapsed time SQL statements are executing. Note that for select statements this also includes the amount of time spent performing fetches of query results.
connectionmanagement call elapsed timeAmount of elapsed time spent performing session connect and disconnect calls.
failed parse elapsed timeAmount of time spent performing SQL parses which ultimately fail with some parse error.
hard parse (sharing criteria) elapsed timeAmount of elapsed time spent performing SQL hard parses when the hard parse resulted from not being able to share an existing cursor in the SQL cache.
hard parse (bind mismatch) elapsed timeAmount of elapsed time spent performing SQL hard parses when the hard parse resulted from bind type or bind size mismatch with an existing cursor in the SQL cache.
PL/SQL execution elapsed timeAmount of elapsed time spent running the PL/SQL interpreter. This does not include time spent recursively executing/parsing SQL statements or time spent recursively executing the Java VM.
PL/SQL compilation elapsed timeAmount of elapsed time spent running the PL/SQL compiler.
inbound PL/SQL rpc elapsed timeTime inbound PL/SQL remote procedure calls have spent executing. It includes all time spent recursively executing SQL and JAVA, and therefore is not easily related to "PL/SQL execution elapsed time".
Java execution elapsed timeAmount of elapsed time spent running the Java VM. This does not include time spent recursively executing/parsing SQL statements or time spent recursively executing PL/SQL.

7. V$IOSTAT_NETWORK

V$IOSTAT_NETWORK displays information about network I/O statistics that were caused by accessing files on a remote database instance.
ColumnDatatypeDescription
CLIENTVARCHAR2(32)Database client name initiating the network I/O (for example, RMAN or PL/SQL)
READS#NUMBERNumber of read operations issued
WRITES#NUMBERNumber of write operations issued
KBYTES_READNUMBERTotal number of kilobytes read
KBYTES_WRITTENNUMBERTotal number of kilobytes written
READ_LATENCYNUMBERTotal read wait time (in milliseconds)
WRITE_LATENCYNUMBERTotal write wait time (in milliseconds)

V$ACTIVE_SESSION_HISTORY

V$ACTIVE_SESSION_HISTORY displays sampled session activity in the database. It contains snapshots of active database sessions taken once a second. A database session is considered active if it was on the CPU or was waiting for an event that didn't belong to the Idle wait class. Refer to the V$EVENT_NAME view for more information on waitclasses.
This view contains one row for each active session per sample and returns the latest session sample rows first. A majority of the columns describing the session in the active session history are present in theV$SESSION view.

ColumnDatatypeDescription
SAMPLE_IDNUMBERID of the sample
SAMPLE_TIMETIMESTAMP(3)Time at which the sample was taken
SESSION_IDNUMBERSession identifier; maps to V$SESSION.SID
SESSION_SERIAL#NUMBERSession serial number (used to uniquely identify a session's objects); maps to V$SESSION.SERIAL#
USER_IDNUMBEROracle user identifier; maps to V$SESSION.USER#
SQL_IDVARCHAR2(13)SQL identifier of the SQL statement that the session was executing at the time of sampling
SQL_CHILD_NUMBERNUMBERChild number of the SQL statement that the session was executing at the time of sampling
SQL_PLAN_HASH_VALUENUMBERNumerical representation of the SQL plan for the cursor. This information might not be available for all session samples.V$SESSIONdoes not contain this information.
FORCE_MATCHING_SIGNATURENUMBERThe signature used when the CURSOR_SHARING parameter is set to FORCE
SQL_OPCODENUMBERIndicates what phase of operation the SQL statement was in; maps to V$SESSION.COMMAND
See Also: "V$SESSION" for information on interpreting this column
SERVICE_HASHNUMBERHash that identifies the Service; maps to V$ACTIVE_SERVICES.NAME_HASH
SESSION_TYPEVARCHAR2(10)Session type:
  • FOREGROUND
  • BACKGROUND
SESSION_STATEVARCHAR2(7)Session state:
  • WAITING
  • ON CPU
QC_SESSION_IDNUMBERQuery coordinator session ID. This information is only available if the sampled session is a parallel query slave. For all other sessions, the value is 0.
QC_INSTANCE_IDNUMBERQuery coordinator instance ID. This information is only available if the sampled session is a parallel query slave. For all other sessions, the value is 0.
BLOCKING_SESSIONNUMBERSession identifier of the blocking session. Populated only when the session was waiting for enqueues or a "buffer busy" wait. Maps to V$SESSION.BLOCKING_SESSION.
BLOCKING_SESSION_STATUSVARCHAR2(11)Status of the blocking session:
  • VALID
  • NO HOLDER
  • GLOBAL
  • NOT IN WAIT
  • UNKNOWN
BLOCKING_SESSION_SERIAL#NUMBERSerial number of the blocking session
EVENTVARCHAR2(64)If SESSION_STATE = WAITING, then the event for which the session was waiting for at the time of sampling.
If SESSION_STATE = ON CPU, then this column will be NULL.
EVENT_IDNUMBERIdentifier of the resource or event for which the session is waiting or for which the session last waited. Interpretation is similar to that of the EVENT column.
EVENT#NUMBERNumber of the resource or event for which the session is waiting or for which the session last waited. Interpretation is similar to that of the EVENT column.
SEQ#NUMBERSequence number that uniquely identifies the wait (incremented for each wait)
P1TEXTVARCHAR2(64)Text of first additional parameter
P1NUMBERFirst additional parameter
P2TEXTVARCHAR2(64)Text of second additional parameter
P2NUMBERSecond additional parameter
P3TEXTVARCHAR2(64)Text of third additional parameter
P3NUMBERThird additional parameter
WAIT_CLASSVARCHAR2(64)Wait class name of the event for which the session was waiting at the time of sampling. Interpretation is similar to that of theEVENTcolumn. Maps to V$SESSION.WAIT_CLASS.
WAIT_CLASS_IDNUMBERWait class identifier of the event for which the session was waiting at the time of sampling. Interpretation is similar to that of the EVENT column. Maps to V$SESSION.WAIT_CLASS_ID.
WAIT_TIMENUMBER0 if the session was waiting at the time of sampling
Total wait time for the event for which the session last waited if the session was on the CPU when sampled
Whether or not WAIT_TIME = 0 is what is useful to find the SESSION_STATE at the time of sampling, rather than the actual value of WAIT_TIME itself. Maps to V$SESSION.WAIT_TIME.
TIME_WAITEDNUMBERIf SESSION_STATE = WAITING, then the time that the session actually spent waiting for that EVENT. This column is set for waits that were in progress at the time the sample was taken.
If a wait event lasted for more than a second and was caught waiting in more than one session sample row, then the actual time spent waiting for that wait event will be populated in the last of those session sample rows. At any given time, this information will not be available for the latest session sample.
XIDRAW(8)Transaction ID that the session was working on at the time of sampling. V$SESSION does not contain this information.
CURRENT_OBJ#NUMBERObject ID of the object that the session is referencing. This information is only available if the session was waiting for Application, Cluster, Concurrency, and User I/O wait events. Maps to V$SESSION.ROW_WAIT_OBJ#.
CURRENT_FILE#NUMBERFile number of the file containing the block that the session is referencing. This information is only available if the session was waiting for Cluster, Concurrency, and User I/O wait events. Maps to V$SESSION.ROW_WAIT_FILE#.
CURRENT_BLOCK#NUMBERID of the block that the session is referencing. This information is only available if the session was waiting for Cluster, Concurrency, and User I/O wait events. Maps to V$SESSION.ROW_WAIT_BLOCK#.
PROGRAMVARCHAR2(48)Name of the operating system program
MODULEVARCHAR2(48)Name of the executing module when sampled, as set by the DBMS_APPLICATION_INFO.SET_MODULE procedure
ACTIONVARCHAR2(32)Name of the executing module when sampled, as set by the DBMS_APPLICATION_INFO.SET_ACTION procedure
CLIENT_IDVARCHAR2(64)Client identifier of the session; maps to V$SESSION.CLIENT_IDENTIFIE


V$SESSION_WAIT

V$SESSION_WAIT displays the current or last wait for each session.
ColumnDatatypeDescription
SIDNUMBERSession identifier; maps to V$SESSION.SID
SEQ#NUMBERA number that uniquely identifies the current or last wait (incremented for each wait)
WAIT_IDNUMBERWait identifier
EVENTVARCHAR2(64)Resource or event for which the session is waiting
P1TEXTVARCHAR2(64)Description of the first wait event parameter
P1NUMBERFirst wait event parameter (in decimal) - ## The absolute FILE NUMBER for the data file involved in the wait.
P1RAWRAW(8)First wait event parameter (in hexadecimal)Foot 1
P2TEXTVARCHAR2(64)Description of the second wait event parameter
P2NUMBERSecond wait event parameter (in decimal) --## The block number within the data file referenced in P1 that is being waited upon.
P2RAWRAW(8)Second wait event parameter (in hexadecimal)Footref 1
P3TEXTVARCHAR2(64)Description of the third wait event parameter
P3NUMBERThird wait event parameter (in decimal) --## The reason code describing why the wait is occurring
P3RAWRAW(8)Third wait event parameter (in hexadecimal)Footref 1
WAIT_CLASS_IDNUMBERIdentifier of the class of the wait event
WAIT_CLASS#NUMBERNumber of the class of the wait event
WAIT_CLASSVARCHAR2(64)Name of the class of the wait event
WAIT_TIMENUMBERIf the session is currently waiting, then the value is 0. If the session is not in a wait, then the value is as follows:
  • 0 - Value is the duration of the last wait in hundredths of a second
  • -1 - Duration of the last wait was less than a hundredth of a second
  • -2 - Parameter TIMED_STATISTICS was set to false
This column has been deprecated in favor of the columns WAIT_TIME_MICRO and STATE.
SECONDS_IN_WAITNUMBERIf the session is currently waiting, then the value is the amount of time waited for the current wait. If the session is not in a wait, then the value is the amount of time since the start of the last wait.
This column has been deprecated in favor of the columns WAIT_TIME_MICRO andTIME_SINCE_LAST_WAIT_MICRO.
STATEVARCHAR2(19)Wait state:
  • WAITING - Session is currently waiting
  • WAITED UNKNOWN TIME - Duration of the last wait is unknown; this is the value when the parameter TIMED_STATISTICS is set to false
  • WAITED SHORT TIME - Last wait was less than a hundredth of a second
  • WAITED KNOWN TIME - Duration of the last wait is specified in the WAIT_TIME column
WAIT_TIME_MICRONUMBERAmount of time waited (in microseconds). If the session is currently waiting, then the value is the time spent in the current wait. If the session is currently not in a wait, then the value is the amount of time waited in the last wait.
TIME_REMAINING_MICRONUMBERValue is interpreted as follows:
  • 0 - Amount of time remaining for the current wait (in microseconds)
  • 0 - Current wait has timed out
  • -1 - Session can indefinitely wait in the current wait
  • NULL - Session is not currently waiting
TIME_SINCE_LAST_WAIT_MICRONUMBERTime elapsed since the end of the last wait (in microseconds). If the session is currently in a wait, then the value is 0.

Footnote 1 The P1RAWP2RAW, and P3RAW columns display the same values as the P1P2, and P3 columns, except that the numbers are displayed in hexadecimal.
Interrogating the P3 (reason code) value from v$session_wait for a buffer busy wait event will tell us why the session is waiting. The reason codes range from 0 to 300 and can be decoded.


CODERESAON for WAIT
-A modification is happening on a SCUR or XCUR buffer but has not yet completed.
0The block is being read into the buffer cache.
100We want to NEW the block, but the block is currently being read by another session (most likely for undo).
110We want the CURRENT block either shared or exclusive but the block is being read into cache by another session, so we have to wait until its read() is completed.
120We want to get the block in current mode, but someone else is currently reading it into the cache. Wait for the user to complete the read. This occurs during buffer lookup.
130Block is being read by another session, and no other suitable block image was found, so we wait until the read is completed. This may also occur after a buffer cache assumed deadlock. The kernel can't get a buffer in a certain amount of time and assumes a deadlock. Therefore it will read the CR version of the block.
200We want to NEW the block, but someone else is using the current copy, so we have to wait for that user to finish.
210The session wants the block in SCUR or XCUR mode. If this is a buffer exchange or the session is in discrete TX mode, the session waits for the first time and the second time escalates the block as a deadlock, so does not show up as waiting very long. In this case, the statistic: "exchange deadlocks" is incremented, and we yield the CPU for the "buffer deadlock" wait event.
220During buffer lookup for a CURRENT copy of a buffer, we have found the buffer but someone holds it in an incompatible mode, so we have to wait.
230Trying to get a buffer in CR/CRX mode, but a modification has started on the buffer that has not yet been completed.
231CR/CRX scan found the CURRENT block, but a modification has started on the buffer that has not yet been completed.
Data block contention—Identify and eliminate HOT blocks from the application via changing PCTFREE and or PCTUSED values to reduce the number of rows per data block. Check for repeatedly scanned indexes. Since each transaction updating a block requires a transaction entry, increase the INITRANS value. The following rules of thumb may be useful for resolving each of the noted contention situations:

  • Freelist block contention—Increase the FREELISTS value. Also, when using Parallel Server, be certain that each instance has its own FREELIST GROUPs.
  • Segment header contention—Again, increase the number of FREELISTs and use FREELIST GROUPs, which can make a difference even within a single instance.
  • Undo header contention—Increase the number of rollback segments.



V$SESSION_EVENT
This view lists information on waits for an event by a session. Note that the TIME_WAITED and AVERAGE_WAIT columns will contain a value of zero on those platforms that do not support a fast timing mechanism. If you are running on one of these platforms and you want this column to reflect true wait times, you must set TIMED_STATISTICS to true in the parameter file. Please remember that doing this will have a small negative effect on system performance.



ColumnDatatypeDescription
SIDNUMBERID of the session
EVENTVARCHAR2(64)Name of the wait event
TOTAL_WAITSNUMBERTotal number of waits for the event by the session
TOTAL_TIMEOUTSNUMBERTotal number of timeouts for the event by the session
TIME_WAITEDNUMBERTotal amount of time waited for the event by the session (in hundredths of a second)
AVERAGE_WAITNUMBERAverage amount of time waited for the event by the session (in hundredths of a second)
MAX_WAITNUMBERMaximum time waited for the event by the session (in hundredths of a second)
TIME_WAITED_MICRONUMBERTotal amount of time waited for the event by the session (in microseconds)
EVENT_IDNUMBERIdentifier of the wait event
WAIT_CLASS_IDNUMBERIdentifier of the class of the wait event
WAIT_CLASS#NUMBERNumber of the class of the wait event
WAIT_CLASSVARCHAR2(64)Name of the class of the wait event


V$SESSION_WAIT_CLASS

V$SESSION_WAIT_CLASS displays the time spent in various wait event operations on a per-session basis.
ColumnDatatypeDescription
SIDNUMBERSession identifier
SERIAL#NUMBERSerial number
WAIT_CLASS_IDNUMBERIdentifier of the wait class
WAIT_CLASS#NUMBERNumber of the wait class
WAIT_CLASSVARCHAR2(64)Name of the wait class
TOTAL_WAITSNUMBERNumber of times waits of the class occurred for the session
TIME_WAITEDNUMBERAmount of time spent in the wait class by the session

V$SESSION_WAIT_HISTORY

V$SESSION_WAIT_HISTORY displays the last 10 wait events for each active session.
ColumnDatatypeDescription
SIDNUMBERSession identifier
SEQ#NUMBERSequence of wait events; 1 is the most recent
EVENT#NUMBEREvent number
EVENTVARCHAR2(64)Resource or event for which the session is waiting
P1TEXTVARCHAR2(64)Description of the first additional parameter
P1NUMBERFirst additional parameter
P2TEXTVARCHAR2(64)Description of the second additional parameter
P2NUMBERSecond additional parameter
P3TEXTVARCHAR2(64)Description of the third additional parameter
P3NUMBERThird additional parameter
WAIT_TIMENUMBERA nonzero value is the session's last wait time. A zero value means the session is currently waiting.


V$EVENT_HISTOGRAM


V$EVENT_HISTOGRAM displays a histogram of the number of waits, the maximum wait, and total wait time on an event basis. The histogram has buckets of time intervals from < 1 ms, < 2 ms, < 4 ms, < 8 ms, ... < 2^21 ms, < 2^22 ms, = 2^22 ms.
The histogram will not be filled unless the TIMED_STATISTICS initialization parameter is set to true.

ColumnDatatypeDescription
EVENT#NUMBEREvent number
EVENTVARCHAR2(64)Name of the Event
WAIT_TIME_MILLINUMBERAmount of time the bucket represents (in milliseconds). If the duration = num, then this column represents waits of duration < num that are not included in any smaller bucket.
WAIT_COUNTNUMBERNumber of waits of the duration belonging to the bucket of the histogram

V$FILE_HISTOGRAM


V$FILE_HISTOGRAM displays a histogram of all single block reads on a per-file basis. The histogram has buckets of time intervals from < 1 ms, < 2 ms, < 4 ms, < 8 ms, ... < 2^21 ms, < 2^22 ms, = 2^22 ms.
The histogram will not be filled unless the TIMED_STATISTICS initialization parameter is set to true.

ColumnDatatypeDescription
FILE#NUMBERFile number
SINGLEBLKRDTIM_MILLINUMBERAmount of time the bucket represents (in milliseconds). If the duration = num, then this column represents waits of duration < num that are not included in any smaller bucket.
SINGLEBLKRDSNUMBERNumber of waits of the duration belonging to the bucket of the histogram


V$SYSTEM_WAIT_CLASS

V$SYSTEM_WAIT_CLASS displays the instance-wide time totals for each registered wait class.
ColumnDatatypeDescription
WAIT_CLASS_IDNUMBERIdentifier of the wait class
WAIT_CLASS#NUMBERNumber of the wait class
WAIT_CLASSVARCHAR2(64)Name of the wait class
TOTAL_WAITSNUMBERNumber of times waits of the class occurred
TIME_WAITEDNUMBERAmount of time spent in the wait by all sessions in the instance


V$TEMP_HISTOGRAM


V$TEMP_HISTOGRAM displays a histogram of all single block reads on a per-tempfile basis. The histogram has buckets of time intervals from < 1 ms, < 2 ms, < 4 ms, < 8 ms, ... < 2^21 ms, < 2^22 ms, >= 2^22 ms.
The histogram will not be filled unless the TIMED_STATISTICS initialization parameter is set to true.

ColumnDatatypeDescription
FILE#NUMBERFile number
SINGLEBLKRDTIM_MILLINUMBERAmount of time the bucket represents (in milliseconds). If the duration = num, then this column represents waits of duration <num that are not included in any smaller bucket.
SINGLEBLKRDSNUMBERNumber of waits of the duration belonging to the bucket of the histogram


V$SESSION

This view lists session information for each current session.
ColumnDatatypeDescription
SADDRRAW(4 | 8)Session address
SIDNUMBERSession identifier
SERIAL#NUMBERSession serial number. Used to uniquely identify a session's objects. Guarantees that session-level commands are applied to the correct session objects if the session ends and another session begins with the same session ID.
AUDSIDNUMBERAuditing session ID
PADDRRAW(4 | 8)Address of the process that owns the session ### JOIN ADDR FROM V$PROCESS
USER#NUMBEROracle user identifier
USERNAMEVARCHAR2(30)Oracle username
COMMANDNUMBERCommand in progress (last statement parsed); for a list of values, see below table These values also appear in the AUDIT_ACTIONStable.
OWNERIDNUMBERThe column contents are invalid if the value is 2147483644. Otherwise, this column contains the identifier of the user who owns the migratable session.
For operations using Parallel Slaves, interpret this value as a 4-byte value. The low-order 2 bytes of which represent the session number, and the high-order bytes the instance ID of the query coordinator.
TADDRVARCHAR2(8)Address of transaction state object ### JOIN ADDR FROM V$TRANSACTION
LOCKWAITVARCHAR2(8)Address of lock waiting for; null if none
STATUSVARCHAR2(8)Status of the session:
  • ACTIVE - Session currently executing SQL
  • INACTIVE
  • KILLED - Session marked to be killed
  • CACHED - Session temporarily cached for use by Oracle*XA
  • SNIPED - Session inactive, waiting on the client
SERVERVARCHAR2(9)Server type (DEDICATEDSHAREDPSEUDONONE)
SCHEMA#NUMBERSchema user identifier
SCHEMANAMEVARCHAR2(30)Schema user name
OSUSERVARCHAR2(30)Operating system client user name
PROCESSVARCHAR2(12)Operating system client process ID
MACHINEVARCHAR2(64)Operating system machine name
TERMINALVARCHAR2(30)Operating system terminal name
PROGRAMVARCHAR2(48)Operating system program name
TYPEVARCHAR2(10)Session type
SQL_ADDRESSRAW(4 | 8)Used with SQL_HASH_VALUEto identify the SQL statement that is currently being executed.
If NULL or 0, then the session is not executing any SQL statement...### JOIN TO ADDRESS FROM V$SQLTEXT, V$SQLAREA AND V$SQL
SQL_HASH_VALUENUMBERUsed with SQL_ADDRESS to identify the SQL statement that is currently being executed
If NULL or 0, then the session is not executing any SQL statement....### JOIN TO HASH_VALUE from V$SQLTEXT, V$SQLAREA, V$SQL
SQL_IDVARCHAR2(13)SQL identifier of the SQL statement that is currently being executed
SQL_CHILD_NUMBERNUMBERChild number of the SQL statement that is currently being executed
PREV_SQL_ADDRRAW(4 | 8)Used with PREV_HASH_VALUE to identify the last SQL statement executed
PREV_HASH_VALUENUMBERUsed with SQL_HASH_VALUE to identify the last SQL statement executed
PREV_SQL_IDVARCHAR2(13)SQL identifier of the last SQL statement executed
PREV_CHILD_NUMBERNUMBERChild number of the last SQL statement executed
MODULEVARCHAR2(48)Name of the currently executing module as set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure
MODULE_HASHNUMBERHash value of the above MODULE
ACTIONVARCHAR2(32)Name of the currently executing action as set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure
ACTION_HASHNUMBERHash value of the above action name
CLIENT_INFOVARCHAR2(64)Information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure
FIXED_TABLE_SEQUENCENUMBERThis contains a number that increases every time the session completes a call to the database and there has been an intervening select from a dynamic performance table. This column can be used by performance monitors to monitor statistics in the database. Each time the performance monitor looks at the database, it only needs to look at sessions that are currently active or have a higher value in this column than the highest value that the performance monitor saw the last time. All the other sessions have been idle since the last time the performance monitor looked at the database.
ROW_WAIT_OBJ#NUMBERObject ID for the table containing the row specified in ROW_WAIT_ROW#
ROW_WAIT_FILE#NUMBERIdentifier for the datafile containing the row specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.
ROW_WAIT_BLOCK#NUMBERIdentifier for the block containing the row specified in ROW_WAIT_ROW#. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.
ROW_WAIT_ROW#NUMBERCurrent row being locked. This column is valid only if the session is currently waiting for another transaction to commit and the value of ROW_WAIT_OBJ# is not -1.
LOGON_TIMEDATETime of logon
LAST_CALL_ETNUMBERIf the session STATUS is currently ACTIVE, then the value represents the elapsed time in seconds since the session has become active.
If the session STATUS is currently INACTIVE, then the value represents the elapsed time in seconds since the session has become inactive.
PDML_ENABLEDVARCHAR2(3)This column has been replaced by column PDML_STATUS
FAILOVER_TYPEVARCHAR2(13)Indicates whether and to what extent transparent application failover (TAF) is enabled for the session:
  • NONE - Failover is disabled for this session
  • SESSION - Client is able to fail over its session following a disconnect
  • SELECT - Client is able to fail over queries in progress as well
FAILOVER_METHODVARCHAR2(10)Indicates the transparent application failover method for the session:
  • NONE - Failover is disabled for this session
  • BASIC - Client itself reconnects following a disconnect
  • PRECONNECT - Backup instance can support all connections from every instance for which it is backed up
FAILED_OVERVARCHAR2(3)Indicates whether the session is running in failover mode and failover has occurred (YES) or not (NO)
RESOURCE_CONSUMER_GROUPVARCHAR2(32)Name of the session's current resource consumer group
PDML_STATUSVARCHAR2(8)If ENABLED, the session is in a PARALLEL DML enabled mode. If DISABLED, PARALLEL DML enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DML.
PDDL_STATUSVARCHAR2(8)If ENABLED, the session is in a PARALLEL DDL enabled mode. If DISABLED, PARALLEL DDL enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL DDL.
PQ_STATUSVARCHAR2(8)If ENABLED, the session is in a PARALLEL QUERY enabled mode. If DISABLED, PARALLEL QUERY enabled mode is not supported for the session. If FORCED, the session has been altered to force PARALLEL QUERY.
CURRENT_QUEUE_DURATIONNUMBERIf queued (1), the current amount of time the session has been queued. If not currently queued, the value is 0.
CLIENT_IDENTIFIERVARCHAR2(64)Client identifier of the session
BLOCKING_SESSION_STATUSVARCHAR2(11)Blocking session status:
  • VALID
  • NO HOLDER
  • GLOBAL
  • NOT IN WAIT
  • UNKNOWN
BLOCKING_INSTANCENUMBERInstance identifier of blocking session
BLOCKING_SESSIONNUMBERSession identifier of blocking session
SEQ#NUMBERSequence number that uniquely identifies the wait. Incremented for each wait.
EVENT#NUMBEREvent number
EVENTVARCHAR2(64)Resource or event for which the session is waiting
P1TEXTVARCHAR2(64)Description of the first additional parameter
P1NUMBERFirst additional parameter ## File ID.. Join this with dba_extents view and col - File_id
P1RAWRAW(4)First additional parameter
P2TEXTVARCHAR2(64)Description of the second additional parameter
P2NUMBERSecond additional parameter ## Block ID
P2RAWRAW(4)Second additional parameter
P3TEXTVARCHAR2(64)Description of the third additional parameter
P3NUMBERThird additional parameter
P3RAWRAW(4)Third additional parameter
WAIT_CLASS_IDNUMBERIdentifier of the wait class
WAIT_CLASS#NUMBERNumber of the wait class
WAIT_CLASSVARCHAR2(64)Name of the wait class
WAIT_TIMENUMBERA nonzero value is the session's last wait time. A zero value means the session is currently waiting.
WAIT_TIME is shown in centiseconds [hundredths of a second].)
SECONDS_IN_WAITNUMBERIf WAIT_TIME = 0, then SECONDS_IN_WAIT is the seconds spent in the current wait condition. If WAIT_TIME > 0, thenSECONDS_IN_WAIT is the seconds since the start of the last wait, and SECONDS_IN_WAIT - WAIT_TIME / 100 is the active seconds since the last wait ended.
STATEVARCHAR2(19)Wait state:
  • 0 - WAITING (the session is currently waiting)
  • -2 - WAITED UNKNOWN TIME (duration of last wait is unknown)
  • -1 - WAITED SHORT TIME (last wait <1/100th of a second)
  • >0 - WAITED KNOWN TIME (WAIT_TIME = duration of last wait)
SERVICE_NAMEVARCHAR2(64)Service name of the session
SQL_TRACEVARCHAR2(8)Indicates whether SQL tracing is enabled (ENABLED) or disabled (DISABLED)
SQL_TRACE_WAITSVARCHAR2(5)Indicates whether wait tracing is enabled (TRUE) or not (FALSE)
SQL_TRACE_BINDSVARCHAR2(5)Indicates whether bind tracing is enabled (TRUE) or not (FALSE)
Below table COMMAND Column of V$SESSION and Corresponding Commands
NumberCommandNumberCommand
1CREATE TABLE2INSERT
3SELECT4CREATE CLUSTER
5ALTER CLUSTER6UPDATE
7DELETE8DROP CLUSTER
9CREATE INDEX10DROP INDEX
11ALTER INDEX12DROP TABLE
13CREATE SEQUENCE14ALTER SEQUENCE
15ALTER TABLE16DROP SEQUENCE
17GRANT OBJECT18REVOKE OBJECT
19CREATE SYNONYM20DROP SYNONYM
21CREATE VIEW22DROP VIEW
23VALIDATE INDEX24CREATE PROCEDURE
25ALTER PROCEDURE26LOCK
27NO-OP28RENAME
29COMMENT30AUDIT OBJECT
31NOAUDIT OBJECT32CREATE DATABASE LINK
33DROP DATABASE LINK34CREATE DATABASE
35ALTER DATABASE36CREATE ROLLBACK SEG
37ALTER ROLLBACK SEG38DROP ROLLBACK SEG
39CREATE TABLESPACE40ALTER TABLESPACE
41DROP TABLESPACE42ALTER SESSION
43ALTER USER44COMMIT
45ROLLBACK46SAVEPOINT
47PL/SQL EXECUTE48SET TRANSACTION
49ALTER SYSTEM50EXPLAIN
51CREATE USER52CREATE ROLE
53DROP USER54DROP ROLE
55SET ROLE56CREATE SCHEMA
57CREATE CONTROL FILE59CREATE TRIGGER
60ALTER TRIGGER61DROP TRIGGER
62ANALYZE TABLE63ANALYZE INDEX
64ANALYZE CLUSTER65CREATE PROFILE
66DROP PROFILE67ALTER PROFILE
68DROP PROCEDURE70ALTER RESOURCE COST
71CREATE MATERIALIZED VIEW LOG72ALTER MATERIALIZED VIEW LOG
73DROP MATERIALIZED VIEW LOG74CREATE MATERIALIZED VIEW
75ALTER MATERIALIZED VIEW76DROP MATERIALIZED VIEW
77CREATE TYPE78DROP TYPE
79ALTER ROLE80ALTER TYPE
81CREATE TYPE BODY82ALTER TYPE BODY
83DROP TYPE BODY84DROP LIBRARY
85TRUNCATE TABLE86TRUNCATE CLUSTER
91CREATE FUNCTION92ALTER FUNCTION
93DROP FUNCTION94CREATE PACKAGE
95ALTER PACKAGE96DROP PACKAGE
97CREATE PACKAGE BODY98ALTER PACKAGE BODY
99DROP PACKAGE BODY100LOGON
101LOGOFF102LOGOFF BY CLEANUP
103SESSION REC104SYSTEM AUDIT
105SYSTEM NOAUDIT106AUDIT DEFAULT
107NOAUDIT DEFAULT108SYSTEM GRANT
109SYSTEM REVOKE110CREATE PUBLIC SYNONYM
111DROP PUBLIC SYNONYM112CREATE PUBLIC DATABASE LINK
113DROP PUBLIC DATABASE LINK114GRANT ROLE
115REVOKE ROLE116EXECUTE PROCEDURE
117USER COMMENT118ENABLE TRIGGER
119DISABLE TRIGGER120ENABLE ALL TRIGGERS
121DISABLE ALL TRIGGERS122NETWORK ERROR
123EXECUTE TYPE157CREATE DIRECTORY
158DROP DIRECTORY159CREATE LIBRARY
160CREATE JAVA161ALTER JAVA
162DROP JAVA163CREATE OPERATOR
164CREATE INDEXTYPE165DROP INDEXTYPE
167DROP OPERATOR168ASSOCIATE STATISTICS
169DISASSOCIATE STATISTICS170CALL METHOD
171CREATE SUMMARY172ALTER SUMMARY
173DROP SUMMARY174CREATE DIMENSION
175ALTER DIMENSION176DROP DIMENSION
177CREATE CONTEXT178DROP CONTEXT
179ALTER OUTLINE180CREATE OUTLINE
181DROP OUTLINE182UPDATE INDEXES
183ALTER OPERATOR




V$TRANSACTION - V$TRANSACTION lists the active transactions in the system.

ColumnDatatypeDescription
ADDRRAW(4 | 8)Address of the transaction state object == Join this with TADDR from v$session
XIDUSNNUMBERUndo segment number
XIDSLOTNUMBERSlot number
XIDSQNNUMBERSequence number
UBAFILNUMBERUndo block address (UBA) filenum
UBABLKNUMBERUBA block number
UBASQNNUMBERUBA sequence number
UBARECNUMBERUBA record number
STATUSVARCHAR2(16)Status
START_TIMEVARCHAR2(20)Start time (wall clock)
START_SCNBNUMBERStart system change number (SCN) base
START_SCNWNUMBERStart SCN wrap
START_UEXTNUMBERStart extent number
START_UBAFILNUMBERStart UBA file number
START_UBABLKNUMBERStart UBA block number
START_UBASQNNUMBERStart UBA sequence number
START_UBARECNUMBERStart UBA record number
SES_ADDRRAW(4 | 8)User session object address ==## Join this with saddr of v$session
FLAGNUMBERFlag
SPACEVARCHAR2(3)YES if a space transaction
RECURSIVEVARCHAR2(3)YES if a recursive transaction
NOUNDOVARCHAR2(3)YES if a no undo transaction
PTXVARCHAR 2(3)YES if parallel transaction
NAMEVARCHAR2(256)Name of a named transaction
PRV_XIDUSNNUMBERPrevious transaction undo segment number
PRV_XIDSLTNUMBERPrevious transaction slot number
PRV_XIDSQNNUMBERPrevious transaction sequence number
PTX_XIDUSNNUMBERRollback segment number of the parent XID
PTX_XIDSLTNUMBERSlot number of the parent XID
PTX_XIDSQNNUMBERSequence number of the parent XID
DSCN-BNUMBERThis column is obsolete and maintained for backward compatibility. The value of this column is always equal to the value in DSCN_BASE.
DSCN-WNUMBERThis column is obsolete and maintained for backward compatibility. The value of this column is always equal to the value in DSCN_WRAP.
USED_UBLKNUMBERNumber of undo blocks used
USED_URECNUMBERNumber of undo records used
LOG_IONUMBERLogical I/O
PHY_IONUMBERPhysical I/O
CR_GETNUMBERConsistent gets
CR_CHANGENUMBERConsistent changes
START_DATEDATEStart time (wall clock)
DSCN_BASENUMBERDependent SCN base
DSCN_WRAPNUMBERDependent SCN wrap
START_SCNNUMBERStart SCN
DEPENDENT_SCNNUMBERDependent SCN
XIDRAW(8)Transaction XID
PRV_XIDRAW(8)Previous transaction XID
PTX_XIDRAW(8)Parent transaction XID



Comments on a few of the columns:



XIDUSN Rollback Segment ID } Transaction ID is
XIDSLOT Slot in RBS TX table } USN.SLOT.SQN or
XIDSQN Wrap of the entry } TX-USNxSLOT-SQNxxxxx


UBAFIL File for last undo entry } Tail end of UNDO for

UBABLK Block for last undo entry } this transaction
UBASQN Sequence no of last entry }
UBAREC Record no in the block }

SES_ADDR- User session object address ==## Join this with saddr of v$session
ADDR - ddress of the transaction state object == Join this with TADDR from v$session


V$PROCESS -

This view contains information about the currently active processes. While the LATCHWAIT column indicates what latch a process is waiting for, the LATCHSPIN column indicates what latch a process is spinning on. On multi-processor machines, Oracle processes will spin on a latch before waiting on it.
ColumnDatatypeDescription
ADDRRAW(4 | 8)Address of process state object ## join to PADDR from V$SESSION
PIDNUMBEROracle process identifier
SPIDVARCHAR2(12)Operating system process identifier
USERNAMEVARCHAR2(15)Operating system process username. Any two-task user coming across the network has "-T" appended to the username.
SERIAL#NUMBERProcess serial number
TERMINALVARCHAR2(30)Operating system terminal identifier
PROGRAMVARCHAR2(48)Program in progress
TRACEIDVARCHAR2(255)Trace file identifier
BACKGROUNDVARCHAR2(1)1 for a background process; NULL for a normal process
LATCHWAITVARCHAR2(8)Address of latch the process is waiting for; NULL if none
LATCHSPINVARCHAR2(8)Address of the latch the process is spinning on; NULL if none
PGA_USED_MEMNUMBERPGA memory currently used by the process
PGA_ALLOC_MEMNUMBERPGA memory currently allocated by the process (including free PGA memory not yet released to the operating system by the server process)
PGA_FREEABLE_MEMNUMBERAllocated PGA memory which can be freed
PGA_MAX_MEMNUMBERMaximum PGA memory ever allocated by the process











V$SESSION_LONGOPS


This view displays the status of various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions, statistics gathering, and query execution, and more operations are added for every Oracle release.
To monitor query execution progress, you must be using the cost-based optimizer and you must:

  • Set the TIMED_STATISTICS or SQL_TRACE parameter to true
  • Gather statistics for your objects with the ANALYZE statement or the DBMS_STATS package
You can add information to this view about application-specific long-running operations by using the DBMS_APPLICATION_INFO.SET_SESSION_LONGOPS procedure.
ColumnDatatypeDescription
SIDNUMBERSession identifier
SERIAL#NUMBERSession serial number
OPNAMEVARCHAR2(64)Brief description of the operation
TARGETVARCHAR2(64)The object on which the operation is carried out
TARGET_DESCVARCHAR2(32)Description of the target
SOFARNUMBERThe units of work done so far
TOTALWORKNUMBERThe total units of work
UNITSVARCHAR2(32)The units of measurement
START_TIMEDATEThe starting time of operation
LAST_UPDATE_TIMEDATETime when statistics last updated
TIMESTAMPDATETimestamp
TIME_REMAININGNUMBEREstimate (in seconds) of time remaining for the operation to complete
ELAPSED_SECONDSNUMBERThe number of elapsed seconds from the start of operations
CONTEXTNUMBERContext
MESSAGEVARCHAR2(512)Statistics summary message
USERNAMEVARCHAR2(30)User ID of the user performing the operation
SQL_ADDRESSRAW(4 | 8)Used with the value of the SQL_HASH_VALUE column to identify the SQL statement associated with the operation
SQL_HASH_VALUENUMBERUsed with the value of the SQL_ADDRESS column to identify the SQL statement associated with the operation
SQL_IDVARCHAR2(13)SQL identifier of the SQL statement associated with the operation
QCSIDNUMBERSession identifier of the parallel coordinator


V$STATNAME


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.

ColumnDatatypeDescription
STATISTIC#NUMBERStatistic number.. Map this with STATISTIC# from V$SESSTAT
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.
NAMEVARCHAR2(64)Statistic name
CLASSNUMBERA 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_IDNUMBERIdentifier of the statistic


V$SESSTAT

This view lists user session statistics. To find the name of the statistic associated with each statistic number (STATISTIC#), query the V$STATNAME view.
ColumnDatatypeDescription
SIDNUMBERSession identifier
STATISTIC#NUMBERStatistic 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.
VALUENUMBERStatistic value


V$SYSSTAT

This view lists system statistics. To find the name of the statistic associated with each statistic number (STATISTIC#), query the V$STATNAME view.
ColumnDatatypeDescription
STATISTIC#NUMBERStatistic number... Map this with STATISTIC# from V$SESSTAT or V$STATNAME
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.
NAMEVARCHAR2(64)Statistic name
CLASSNUMBERA 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
VALUENUMBERStatistic value
STAT_IDNUMBERIdentifier of the statistic




V$SQL

V$SQL lists statistics on shared SQL area 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.
ColumnDatatypeDescription
SQL_TEXTVARCHAR2(1000)First thousand characters of the SQL text for the current cursor
SQL_FULLTEXTCLOBFull 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$SQL_TEXT dynamic performance view.
SQL_IDVARCHAR2(13)SQL identifier of the parent cursor in the library cache
SHARABLE_MEMNUMBERAmount of shared memory used by the child cursor (in bytes)
PERSISTENT_MEMNUMBERFixed amount of memory used for the lifetime of the child cursor (in bytes)
RUNTIME_MEMNUMBERFixed amount of memory required during the execution of the child cursor
SORTSNUMBERNumber of sorts that were done for the child cursor
LOADED_VERSIONSNUMBERIndicates whether the context heap is loaded (1) or not (0)
OPEN_VERSIONSNUMBERIndicates whether the child cursor is locked (1) or not (0)
USERS_OPENINGNUMBERNumber of users executing the statement
FETCHESNUMBERNumber of fetches associated with the SQL statement
EXECUTIONSNUMBERNumber of executions that took place on this object since it was brought into the library cache
PX_SERVERS_EXECUTIONSNUMBERTotal number of executions performed by Parallel eXecution Servers. The value is 0 when the statement has never been executed in parallel.
END_OF_FETCH_COUNTNUMBERNumber 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 theEND_OF_FETCH_COUNT column should be less or equal to the value of the EXECUTIONS column.
USERS_EXECUTINGNUMBERNumber of users executing the statement
LOADSNUMBERNumber of times the object was either loaded or reloaded
FIRST_LOAD_TIMEVARCHAR2(19)Timestamp of the parent creation time
INVALIDATIONSNUMBERNumber of times this child cursor has been invalidated
PARSE_CALLSNUMBERNumber of parse calls for this child cursor
DISK_READSNUMBERNumber of disk reads for this child cursor
DIRECT_WRITESNUMBERNumber of direct writes for this child cursor
BUFFER_GETSNUMBERNumber of buffer gets for this child cursor
APPLICATION_WAIT_TIMENUMBERApplication wait time (in microseconds)
CONCURRENCY_WAIT_TIMENUMBERConcurrency wait time (in microseconds)
CLUSTER_WAIT_TIMENUMBERCluster wait time (in microseconds)
USER_IO_WAIT_TIMENUMBERUser I/O Wait Time (in microseconds)
PLSQL_EXEC_TIMENUMBERPL/SQL execution time (in microseconds)
JAVA_EXEC_TIMENUMBERJava execution time (in microseconds)
ROWS_PROCESSEDNUMBERTotal number of rows the parsed SQL statement returns
COMMAND_TYPENUMBEROracle command type definition
OPTIMIZER_MODEVARCHAR2(10)Mode under which the SQL statement is executed
OPTIMIZER_COSTNUMBERCost of this query given by the optimizer
OPTIMIZER_ENVRAW(691)Optimizer environment
OPTIMIZER_ENV_HASH_VALUENUMBERHash value for the optimizer environment
PARSING_USER_IDNUMBERUser ID of the user who originally built this child cursor
PARSING_SCHEMA_IDNUMBERSchema ID that was used to originally build this child cursor
PARSING_SCHEMA_NAMEVARCHAR2(30)Schema name that was used to originally build this child cursor
KEPT_VERSIONSNUMBERIndicates whether this child cursor has been marked to be kept pinned in the cache using the DBMS_SHARED_POOL package
ADDRESSRAW(4 | 8)Address of the handle to the parent for this cursor
TYPE_CHK_HEAPRAW(4)Descriptor of the type check heap for this child cursor
HASH_VALUENUMBERHash value of the parent statement in the library cache
OLD_HASH_VALUENUMBEROld SQL hash value
PLAN_HASH_VALUENUMBERNumerical 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_NUMBERNUMBERNumber of this child cursor
SERVICEVARCHAR2(64)Service name
SERVICE_HASHNUMBERHash value for the name listed in SERVICE
MODULEVARCHAR2(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_HASHNUMBERHash value of the module listed in the MODULE column
ACTIONVARCHAR2(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_HASHNUMBERHash value of the action listed in the ACTION column
SERIALIZABLE_ABORTSNUMBERNumber of times the transaction fails to serialize, producing ORA-08177 errors, per cursor
OUTLINE_CATEGORYVARCHAR2(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_TIMENUMBERCPU time (in microseconds) used by this cursor for parsing, executing, and fetching
ELAPSED_TIMENUMBERElapsed time (in microseconds) used by this cursor for parsing, executing, and fetching
OUTLINE_SIDNUMBEROutline session identifier
CHILD_ADDRESSRAW(4 | 8)Address of the child cursor
SQLTYPENUMBERDenotes the version of the SQL language used for this statement
REMOTEVARCHAR2(1)Indicates whether the cursor is remote mapped (Y) or not (N)
OBJECT_STATUSVARCHAR2(19)Status of the cursor:
  • VALID - Valid, authorized without errors
  • VALID_AUTH_ERROR - Valid, authorized with authorization errors
  • VALID_COMPILE_ERROR - Valid, authorized with compilation errors
  • VALID_UNAUTH - Valid, unauthorized
  • INVALID_UNAUTH - Invalid, unauthorized
  • INVALID - Invalid, unauthorized but keep the timestamp
LITERAL_HASH_VALUENUMBERHash value of the literals which are replaced with system-generated bind variables and are to be matched, whenCURSOR_SHARINGis used. This is not the hash value for the SQL statement. If CURSOR_SHARING is not used, then the value is 0.
LAST_LOAD_TIMEVARCHAR2(19)Time at which the query plan (heap 6) was loaded into the library cache
IS_OBSOLETEVARCHAR2(1)Indicates whether the cursor has become obsolete (Y) or not (N). This can happen if the number of child cursors is too large.
CHILD_LATCHNUMBERChild latch number that is protecting the cursor
SQL_PROFILEVARCHAR2(64)SQL profile
PROGRAM_IDNUMBERProgram identifier
PROGRAM_LINE#NUMBERProgram line number
EXACT_MATCHING_SIGNATURENUMBERSignature calculated on the normalized SQL text. The normalization includes the removal of white space and the uppercasing of all non-literal strings.
FORCE_MATCHING_SIGNATURENUMBERThe signature used when the CURSOR_SHARING parameter is set to FORCE
LAST_ACTIVE_TIMEDATETIme at which the query plan was last active
BIND_DATARAW(2000)Bind data


V$LOCK

This view lists the locks currently held by the Oracle Database and outstanding requests for a lock or latch.
ColumnDatatypeDescription
ADDRRAW(4 | 8)Address of lock state object
KADDRRAW(4 | 8)Address of lock
SIDNUMBERIdentifier for session holding or acquiring the lock ## join with SID from V$SESSION
TYPEVARCHAR2(2)Type of user or system lock
The locks on the user types are obtained by user applications. Any process that is blocking others is likely to be holding one of these locks. The user type locks are:
TM - DML enqueue
TX - Transaction enqueue
UL - User supplied
The locks on the system types are held for extremely short periods of time. The system type locks are listed in Table 4-1.
ID1NUMBERLock identifier #1 (depends on type) ## Join with OBJECT_ID from dba_objects
ID2NUMBERLock identifier #2 (depends on type)
LMODENUMBERLock mode in which the session holds the lock:
  • 0 - none
  • 1 - null (NULL)
  • 2 - row-S (SS)
  • 3 - row-X (SX)
  • 4 - share (S)
  • 5 - S/Row-X (SSX)
  • 6 - exclusive (X)
REQUESTNUMBERLock mode in which the process requests the lock:
  • 0 - none
  • 1 - null (NULL)
  • 2 - row-S (SS)
  • 3 - row-X (SX)
  • 4 - share (S)
  • 5 - S/Row-X (SSX)
  • 6 - exclusive (X)
CTIMENUMBERTime since current mode was granted
BLOCKNUMBERThe lock is blocking another lock
Table 4-1 Values for the TYPE Column: System Types
System TypeDescriptionSystem TypeDescription
BLBuffer hash table instanceNA..NZLibrary cache pin instance (A..Z = namespace)
CFControl file schema global enqueuePFPassword File
CICross-instance function invocation instancePI, PSParallel operation
CUCursor bindPRProcess startup
DFData file instanceQA..QZRow cache instance (A..Z = cache)
DLDirect loader parallel index createRTRedo thread global enqueue
DMMount/startup db primary/secondary instanceSCSystem change number instance
DRDistributed recovery processSMSMON
DXDistributed transaction entrySNSequence number instance
FSFile setSQSequence number enqueue
HWSpace management operations on a specific segmentSSSort segment
INInstance numberSTSpace transaction enqueue
IRInstance recovery serialization global enqueueSVSequence number value
ISInstance stateTAGeneric enqueue
IVLibrary cache invalidation instanceTSTemporary segment enqueue (ID2=0)
JQJob queueTSNew block allocation enqueue (ID2=1)
KKThread kickTTTemporary table enqueue
LA .. LPLibrary cache lock instance lock (A..P = namespace)UNUser name
MMMount definition global enqueueUSUndo segment DDL
MRMedia recoveryWLBeing-written redo log instance


V$SQLAREA


V$SQLAREA lists statistics on shared SQL area and contains one row per SQL string. It provides statistics on SQL statements that are in memory, parsed, and ready for execution.


ColumnDatatypeDescription
SQL_TEXTVARCHAR2(1000)First thousand characters of the SQL text for the current cursor
SQL_FULLTEXTCLOBAll characters of the SQL text for the current cursor
SQL_IDVARCHAR2(13)SQL identifier of the parent cursor in the library cache
SHARABLE_MEMNUMBERAmount of shared memory used by a cursor. If multiple child cursors exist, then the sum of all shared memory used by all child cursors.
PERSISTENT_MEMNUMBERFixed amount of memory used for the lifetime of an open cursor. If multiple child cursors exist, the fixed sum of memory used for the lifetime of all the child cursors.
RUNTIME_MEMNUMBERFixed amount of memory required during execution of a cursor. If multiple child cursors exist, the fixed sum of all memory required during execution of all the child cursors.
SORTSNUMBERSum of the number of sorts that were done for all the child cursors
VERSION_COUNTNUMBERNumber of child cursors that are present in the cache under this parent
LOADED_VERSIONSNUMBERNumber of child cursors that are present in the cache and have their context heap (KGL heap 6) loaded
OPEN_VERSIONSNUMBERThe number of child cursors that are currently open under this current parent
USERS_OPENINGNUMBERNumber of users that have any of the child cursors open
FETCHESNUMBERNumber of fetches associated with the SQL statement
EXECUTIONSNUMBERTotal number of executions, totalled over all the child cursors
PX_SERVERS_EXECUTIONSNUMBERTotal number of executions performed by Parallel eXecution Servers. The value is 0 when the statement has never been executed in parallel.
END_OF_FETCH_COUNTNUMBERNumber 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_EXECUTINGNUMBERTotal number of users executing the statement over all child cursors
LOADSNUMBERNumber of times the object was loaded or reloaded
FIRST_LOAD_TIMEVARCHAR2(19)Timestamp of the parent creation time
INVALIDATIONSNUMBERTotal number of invalidations over all the child cursors
PARSE_CALLSNUMBERSum of all parse calls to all the child cursors under this parent
DISK_READSNUMBERSum of the number of disk reads over all child cursors
DIRECT_WRITESNUMBERSum of the number of direct writes over all child cursors
BUFFER_GETSNUMBERSum of buffer gets over all child cursors
APPLICATION_WAIT_TIMENUMBERApplication wait time (in microseconds)
CONCURRENCY_WAIT_TIMENUMBERConcurrency wait time (in microseconds)
CLUSTER_WAIT_TIMENUMBERCluster wait time (in microseconds)
USER_IO_WAIT_TIMENUMBERUser I/O Wait Time (in microseconds)
PLSQL_EXEC_TIMENUMBERPL/SQL execution time (in microseconds)
JAVA_EXEC_TIMENUMBERJava execution time (in microseconds)
ROWS_PROCESSEDNUMBERTotal number of rows processed on behalf of this SQL statement
COMMAND_TYPENUMBEROracle command type definition
OPTIMIZER_MODEVARCHAR2(10)Mode under which the SQL statement was executed
OPTIMIZER_COSTNUMBERCost of this query given by the optimizer
OPTIMIZER_ENVRAW(703)Optimizer environment
OPTIMIZER_ENV_HASH_VALUENUMBERHash value for the optimizer environment
PARSING_USER_IDNUMBERUser ID of the user that has parsed the very first cursor under this parent
PARSING_SCHEMA_IDNUMBERSchema ID that was used to parse this child cursor
PARSING_SCHEMA_NAMEVARCHAR2(30)Schema name that was used to parse this child cursor
KEPT_VERSIONSNUMBERNumber of child cursors that have been marked to be kept using the DBMS_SHARED_POOLpackage
ADDRESSRAW(4 | 8)Address of the handle to the parent for this cursor
HASH_VALUENUMBERHash value of the parent statement in the library cache
OLD_HASH_VALUENUMBEROld SQL hash value
PLAN_HASH_VALUENUMBERNumerical representation of the SQL plan for this cursor. Comparing onePLAN_HASH_VALUE to another easily identifies whether or not two plans are the same (rather than comparing the two plans line by line)
MODULEVARCHAR2(64)Contains the name of the module that was executing at the time that the SQL statement was first parsed as set by calling DBMS_APPLICATION_INFO.SET_MODULE
MODULE_HASHNUMBERHash value of the module that is named in the MODULE column
ACTIONVARCHAR2(64)Contains the name of the action that was executing at the time that the SQL statement was first parsed as set by calling DBMS_APPLICATION_INFO.SET_ACTION
ACTION_HASHNUMBERHash value of the action that is named in the ACTION column
SERIALIZABLE_ABORTSNUMBERNumber of times the transaction fails to serialize, producing ORA-08177 errors, totalled over all the child cursors
OUTLINE_CATEGORYVARCHAR2(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_TIMENUMBERCPU time (in microseconds) used by this cursor for parsing, executing, and fetching
ELAPSED_TIMENUMBERElapsed time (in microseconds) used by this cursor for parsing, executing, and fetching
OUTLINE_SIDVARCHAR2(40)Outline session identifier
LAST_ACTIVE_CHILD_ADDRESSRAW(4)Address (identifier) of the child cursor that was the last to be active in the group (that is, the child cursor on behalf of which statistics in V$SQL were updated)
REMOTEVARCHAR2(1)Indicates whether the cursor is remote mapped (Y) or not (N)
OBJECT_STATUSVARCHAR2(19)Status of the cursor:
  • VALID - Valid, authorized without errors
  • VALID_AUTH_ERROR - Valid, authorized with authorization errors
  • VALID_COMPILE_ERROR - Valid, authorized with compilation errors
  • VALID_UNAUTH - Valid, unauthorized
  • INVALID_UNAUTH - Invalid, unauthorized
  • INVALID - Invalid, unauthorized but keep the timestamp
LITERAL_HASH_VALUENUMBERHash 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_TIMEDATETime at which the query plan (heap 6) was loaded into the library cache
IS_OBSOLETEVARCHAR2(1)Indicates whether the cursor has become obsolete (Y) or not (N). This can happen if the number of child cursors is too large.
CHILD_LATCHNUMBERChild latch number that is protecting the cursor
SQL_PROFILEVARCHAR2(64)SQL profile
PROGRAM_IDNUMBERProgram identifier
PROGRAM_LINE#NUMBERProgram line number
EXACT_MATCHING_SIGNATURENUMBERThe signature used when the CURSOR_SHARING parameter is set to EXACT
FORCE_MATCHING_SIGNATURENUMBERThe signature used when the CURSOR_SHARING parameter is set to FORCE
LAST_ACTIVE_TIMEDATETime at which the query plan was last active
BIND_DATARAW(2000)Bind data




V$SESS_TIME_MODEL


V$SESS_TIME_MODEL displays the session-accumulated time for various operations. The time reported is the total elapsed or CPU time (in microseconds). Any timed operation will buffer at most 5 seconds of time data. Specifically, this means that if a timed operation (such as SQL execution) takes a long period of time to perform, the data published to this view is at most missing 5 seconds of the time accumulated for the operation.

The time values are 8-byte integers and can therefore hold approximately 580,000 years of time before wrapping. Background process time is not included in a statistic value unless the statistic is specifically for background processes.



ColumnDatatypeDescription
SIDNUMBERSession ID (same as in V$SESSION) ## join with sid from v$session
STAT_IDNUMBERStatistic identifier for the time statistic
STAT_NAMEVARCHAR2(64)Name of the statistic (see Table below )
VALUENUMBERAmount of time (in microseconds) that the session has spent in this operation



Tabl V$SESS_TIME_MODEL and V$SYS_TIME_MODEL Statistics



Statistic NameDescription
DB TimeAmount of elapsed time (in microseconds) spent performing Database user-level calls. This does not include the time spent on instance background processes such as PMON.
DB CPUAmount of CPU time (in microseconds) spent on database user-level calls. This does not include the CPU time spent on instance background processes such as PMON.
background cpu timeAmount of CPU time (in microseconds) consumed by database background processes.
sequenceload elapsed timeAmount of elapsed time spent getting the next sequence number from the data dictionary. If a sequence is cached, then this is the amount of time spent replenishing the cache when it runs out. No time is charged when a sequence number is found in the cache. For non-cached sequences, some time will be charged for every nextval call.
parse time elapsedAmount of elapsed time spent parsing SQL statements. It includes both soft and hard parse time.
hard parse elapsed timeAmount of elapsed time spent hard parsing SQL statements.
sql executeelapsed timeAmount of elapsed time SQL statements are executing. Note that for select statements this also includes the amount of time spent performing fetches of query results.
connectionmanagement call elapsed timeAmount of elapsed time spent performing session connect and disconnect calls.
failed parse elapsed timeAmount of time spent performing SQL parses which ultimately fail with some parse error.
hard parse (sharing criteria) elapsed timeAmount of elapsed time spent performing SQL hard parses when the hard parse resulted from not being able to share an existing cursor in the SQL cache.
hard parse (bind mismatch) elapsed timeAmount of elapsed time spent performing SQL hard parses when the hard parse resulted from bind type or bind size mismatch with an existing cursor in the SQL cache.
PL/SQL execution elapsed timeAmount of elapsed time spent running the PL/SQL interpreter. This does not include time spent recursively executing/parsing SQL statements or time spent recursively executing the Java VM.
PL/SQL compilation elapsed timeAmount of elapsed time spent running the PL/SQL compiler.
inboundPL/SQL rpc elapsed timeTime inbound PL/SQL remote procedure calls have spent executing. It includes all time spent recursively executing SQL and JAVA, and therefore is not easily related to "PL/SQL execution elapsed time".
Java execution elapsed tim
Amount of elapsed time spent running the Java VM. This does not include time spent recursively executing/parsing SQL statements or time spent recursively executing PL/SQL.

No comments:

Post a Comment