Important views and Tables
V$SYSAUX_OCCUPANTS displays SYSAUX tablespace occupant information.
Column | Datatype | Description |
---|---|---|
OCCUPANT_NAME | VARCHAR2(64) | Occupant name |
OCCUPANT_DESC | VARCHAR2(64) | Occupant description |
SCHEMA_NAME | VARCHAR2(64) | Schema name for the occupant |
MOVE_PROCEDURE | VARCHAR2(64) | Name of the move procedure; null if not applicable |
MOVE_PROCEDURE_DESC | VARCHAR2(64) | Description of the move procedure |
SPACE_USAGE_KBYTES | NUMBER | Current 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.
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 class. The following class numbers are additive:
|
VALUE | NUMBER | Statistic value |
STAT_ID | NUMBER | Identifier 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.
Column | Datatype | Description |
---|---|---|
EVENT | VARCHAR2(64) | Name of the wait event |
TOTAL_WAITS | NUMBER | Total number of waits for the event |
TOTAL_TIMEOUTS | NUMBER | Total number of timeouts for the event |
TIME_WAITED | NUMBER | Total amount of time waited for the event (in hundredths of a second) |
AVERAGE_WAIT | NUMBER | Average amount of time waited for the event (in hundredths of a second) |
TIME_WAITED_MICRO | NUMBER | Total amount of time waited for the event (in microseconds) |
EVENT_ID | NUMBER | Identifier of the wait event |
WAIT_CLASS_ID | NUMBER | Identifier of the class of the wait event |
WAIT_CLASS# | NUMBER | Number of the class of the wait event |
WAIT_CLASS | VARCHAR2(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.
Column | Datatype | Description |
---|---|---|
NUM | NUMBER | Parameter number |
NAME | VARCHAR2(80) | Name of the parameter |
TYPE | NUMBER | Parameter type:
|
VALUE | VARCHAR2(512) | Instance-wide parameter value |
DISPLAY_VALUE | VARCHAR2(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. |
ISDEFAULT | VARCHAR2(9) | Indicates whether the parameter is set to the default value (TRUE) or the parameter value was specified in the parameter file (FALSE) |
ISSES_MODIFIABLE | VARCHAR2(5) | Indicates whether the parameter can be changed with ALTER SESSION (TRUE) or not (FALSE) |
ISSYS_MODIFIABLE | VARCHAR2(9) | Indicates whether the parameter can be changed with ALTER SYSTEM and when the change takes effect:
|
ISINSTANCE_MODIFIABLE | VARCHAR2(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. |
ISMODIFIED | VARCHAR2(8) | Indicates how the parameter was modified. If an ALTER SYSTEM was performed, the value will be MODIFIED. |
ISADJUSTED | VARCHAR2(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) |
ISDEPRECATED | VARCHAR2(5) | Indicates whether the parameter has been deprecated (TRUE) or not (FALSE) |
DESCRIPTION | VARCHAR2(255) | Description of the parameter |
UPDATE_COMMENT | VARCHAR2(255) | Comments associated with the most recent update |
HASH | NUMBER | Hash 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.
Column | Datatype | NULL | Description |
---|---|---|---|
HOLDING_SESSION | NUMBER | 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.
Column | Datatype | Description |
---|---|---|
SID | NUMBER | Session ID (same as in V$SESSION) |
STAT_ID | NUMBER | Statistic identifier for the time statistic |
STAT_NAME | VARCHAR2(64) | Name of the statistic (Table 5-4) |
VALUE | NUMBER | Amount of time (in microseconds) that the session has spent in this operation |
Statistic Name | Description |
---|---|
DB Time | Amount 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 CPU | Amount 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 cputime | Amount of CPU time (in microseconds) consumed by database background processes. |
sequence load elapsed time | Amount 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 elapsed | Amount of elapsed time spent parsing SQL statements. It includes both soft and hard parse time. |
hard parse elapsed time | Amount of elapsed time spent hard parsing SQL statements. |
sql executeelapsed time | Amount 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 time | Amount of elapsed time spent performing session connect and disconnect calls. |
failed parse elapsed time | Amount of time spent performing SQL parses which ultimately fail with some parse error. |
hard parse (sharing criteria) elapsed time | Amount 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 time | Amount 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 time | Amount 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 time | Amount of elapsed time spent running the PL/SQL compiler. |
inbound PL/SQL rpc elapsed time | Time 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 time | 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. |
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.
Column | Datatype | Description |
---|---|---|
CLIENT | VARCHAR2(32) | Database client name initiating the network I/O (for example, RMAN or PL/SQL) |
READS# | NUMBER | Number of read operations issued |
WRITES# | NUMBER | Number of write operations issued |
KBYTES_READ | NUMBER | Total number of kilobytes read |
KBYTES_WRITTEN | NUMBER | Total number of kilobytes written |
READ_LATENCY | NUMBER | Total read wait time (in milliseconds) |
WRITE_LATENCY | NUMBER | Total 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.
Column | Datatype | Description |
---|---|---|
SAMPLE_ID | NUMBER | ID of the sample |
SAMPLE_TIME | TIMESTAMP(3) | Time at which the sample was taken |
SESSION_ID | NUMBER | Session identifier; maps to V$SESSION.SID |
SESSION_SERIAL# | NUMBER | Session serial number (used to uniquely identify a session's objects); maps to V$SESSION.SERIAL# |
USER_ID | NUMBER | Oracle user identifier; maps to V$SESSION.USER# |
SQL_ID | VARCHAR2(13) | SQL identifier of the SQL statement that the session was executing at the time of sampling |
SQL_CHILD_NUMBER | NUMBER | Child number of the SQL statement that the session was executing at the time of sampling |
SQL_PLAN_HASH_VALUE | NUMBER | Numerical 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_SIGNATURE | NUMBER | The signature used when the CURSOR_SHARING parameter is set to FORCE |
SQL_OPCODE | NUMBER | Indicates 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_HASH | NUMBER | Hash that identifies the Service; maps to V$ACTIVE_SERVICES.NAME_HASH |
SESSION_TYPE | VARCHAR2(10) | Session type:
|
SESSION_STATE | VARCHAR2(7) | Session state:
|
QC_SESSION_ID | NUMBER | Query 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_ID | NUMBER | Query 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_SESSION | NUMBER | Session 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_STATUS | VARCHAR2(11) | Status of the blocking session:
|
BLOCKING_SESSION_SERIAL# | NUMBER | Serial number of the blocking session |
EVENT | VARCHAR2(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_ID | NUMBER | Identifier 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# | NUMBER | Number 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# | NUMBER | Sequence number that uniquely identifies the wait (incremented for each wait) |
P1TEXT | VARCHAR2(64) | Text of first additional parameter |
P1 | NUMBER | First additional parameter |
P2TEXT | VARCHAR2(64) | Text of second additional parameter |
P2 | NUMBER | Second additional parameter |
P3TEXT | VARCHAR2(64) | Text of third additional parameter |
P3 | NUMBER | Third additional parameter |
WAIT_CLASS | VARCHAR2(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_ID | NUMBER | Wait 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_TIME | NUMBER | 0 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_WAITED | NUMBER | If 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. |
XID | RAW(8) | Transaction ID that the session was working on at the time of sampling. V$SESSION does not contain this information. |
CURRENT_OBJ# | NUMBER | Object 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# | NUMBER | File 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# | NUMBER | ID 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#. |
PROGRAM | VARCHAR2(48) | Name of the operating system program |
MODULE | VARCHAR2(48) | Name of the executing module when sampled, as set by the DBMS_APPLICATION_INFO.SET_MODULE procedure |
ACTION | VARCHAR2(32) | Name of the executing module when sampled, as set by the DBMS_APPLICATION_INFO.SET_ACTION procedure |
CLIENT_ID | VARCHAR2(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.Column | Datatype | Description |
---|---|---|
SID | NUMBER | Session identifier; maps to V$SESSION.SID |
SEQ# | NUMBER | A number that uniquely identifies the current or last wait (incremented for each wait) |
WAIT_ID | NUMBER | Wait identifier |
EVENT | VARCHAR2(64) | Resource or event for which the session is waiting |
P1TEXT | VARCHAR2(64) | Description of the first wait event parameter |
P1 | NUMBER | First wait event parameter (in decimal) - ## The absolute FILE NUMBER for the data file involved in the wait. |
P1RAW | RAW(8) | First wait event parameter (in hexadecimal)Foot 1 |
P2TEXT | VARCHAR2(64) | Description of the second wait event parameter |
P2 | NUMBER | Second wait event parameter (in decimal) --## The block number within the data file referenced in P1 that is being waited upon. |
P2RAW | RAW(8) | Second wait event parameter (in hexadecimal)Footref 1 |
P3TEXT | VARCHAR2(64) | Description of the third wait event parameter |
P3 | NUMBER | Third wait event parameter (in decimal) --## The reason code describing why the wait is occurring |
P3RAW | RAW(8) | Third wait event parameter (in hexadecimal)Footref 1 |
WAIT_CLASS_ID | NUMBER | Identifier of the class of the wait event |
WAIT_CLASS# | NUMBER | Number of the class of the wait event |
WAIT_CLASS | VARCHAR2(64) | Name of the class of the wait event |
WAIT_TIME | NUMBER | If the session is currently waiting, then the value is 0. If the session is not in a wait, then the value is as follows:
|
SECONDS_IN_WAIT | NUMBER | If 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. |
STATE | VARCHAR2(19) | Wait state:
|
WAIT_TIME_MICRO | NUMBER | Amount 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_MICRO | NUMBER | Value is interpreted as follows:
|
TIME_SINCE_LAST_WAIT_MICRO | NUMBER | Time 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 P1RAW, P2RAW, and P3RAW columns display the same values as the P1, P2, 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.
CODE | RESAON for WAIT | |
- | A modification is happening on a SCUR or XCUR buffer but has not yet completed. | |
0 | The block is being read into the buffer cache. | |
100 | We want to NEW the block, but the block is currently being read by another session (most likely for undo). | |
110 | We 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. | |
120 | We 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. | |
130 | Block 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. | |
200 | We want to NEW the block, but someone else is using the current copy, so we have to wait for that user to finish. | |
210 | The 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. | |
220 | During 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. | |
230 | Trying to get a buffer in CR/CRX mode, but a modification has started on the buffer that has not yet been completed. | |
231 | CR/CRX scan found the CURRENT block, but a modification has started on the buffer that has not yet been completed. |
- 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.
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.
Column | Datatype | Description |
---|---|---|
SID | NUMBER | ID of the session |
EVENT | VARCHAR2(64) | Name of the wait event |
TOTAL_WAITS | NUMBER | Total number of waits for the event by the session |
TOTAL_TIMEOUTS | NUMBER | Total number of timeouts for the event by the session |
TIME_WAITED | NUMBER | Total amount of time waited for the event by the session (in hundredths of a second) |
AVERAGE_WAIT | NUMBER | Average amount of time waited for the event by the session (in hundredths of a second) |
MAX_WAIT | NUMBER | Maximum time waited for the event by the session (in hundredths of a second) |
TIME_WAITED_MICRO | NUMBER | Total amount of time waited for the event by the session (in microseconds) |
EVENT_ID | NUMBER | Identifier of the wait event |
WAIT_CLASS_ID | NUMBER | Identifier of the class of the wait event |
WAIT_CLASS# | NUMBER | Number of the class of the wait event |
WAIT_CLASS | VARCHAR2(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.Column | Datatype | Description |
---|---|---|
SID | NUMBER | Session identifier |
SERIAL# | NUMBER | Serial number |
WAIT_CLASS_ID | NUMBER | Identifier of the wait class |
WAIT_CLASS# | NUMBER | Number of the wait class |
WAIT_CLASS | VARCHAR2(64) | Name of the wait class |
TOTAL_WAITS | NUMBER | Number of times waits of the class occurred for the session |
TIME_WAITED | NUMBER | Amount 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.Column | Datatype | Description |
---|---|---|
SID | NUMBER | Session identifier |
SEQ# | NUMBER | Sequence of wait events; 1 is the most recent |
EVENT# | NUMBER | Event number |
EVENT | VARCHAR2(64) | Resource or event for which the session is waiting |
P1TEXT | VARCHAR2(64) | Description of the first additional parameter |
P1 | NUMBER | First additional parameter |
P2TEXT | VARCHAR2(64) | Description of the second additional parameter |
P2 | NUMBER | Second additional parameter |
P3TEXT | VARCHAR2(64) | Description of the third additional parameter |
P3 | NUMBER | Third additional parameter |
WAIT_TIME | NUMBER | A 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.
Column | Datatype | Description |
---|---|---|
EVENT# | NUMBER | Event number |
EVENT | VARCHAR2(64) | Name of the Event |
WAIT_TIME_MILLI | NUMBER | Amount 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_COUNT | NUMBER | Number 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.
Column | Datatype | Description |
---|---|---|
FILE# | NUMBER | File number |
SINGLEBLKRDTIM_MILLI | NUMBER | Amount 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. |
SINGLEBLKRDS | NUMBER | Number 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.Column | Datatype | Description |
---|---|---|
WAIT_CLASS_ID | NUMBER | Identifier of the wait class |
WAIT_CLASS# | NUMBER | Number of the wait class |
WAIT_CLASS | VARCHAR2(64) | Name of the wait class |
TOTAL_WAITS | NUMBER | Number of times waits of the class occurred |
TIME_WAITED | NUMBER | Amount 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.
Column | Datatype | Description |
---|---|---|
FILE# | NUMBER | File number |
SINGLEBLKRDTIM_MILLI | NUMBER | Amount 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. |
SINGLEBLKRDS | NUMBER | Number of waits of the duration belonging to the bucket of the histogram |
V$SESSION
This view lists session information for each current session.Column | Datatype | Description |
---|---|---|
SADDR | RAW(4 | 8) | Session address |
SID | NUMBER | Session identifier |
SERIAL# | NUMBER | Session 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. |
AUDSID | NUMBER | Auditing session ID |
PADDR | RAW(4 | 8) | Address of the process that owns the session ### JOIN ADDR FROM V$PROCESS |
USER# | NUMBER | Oracle user identifier |
USERNAME | VARCHAR2(30) | Oracle username |
COMMAND | NUMBER | Command in progress (last statement parsed); for a list of values, see below table These values also appear in the AUDIT_ACTIONStable. |
OWNERID | NUMBER | The 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. |
TADDR | VARCHAR2(8) | Address of transaction state object ### JOIN ADDR FROM V$TRANSACTION |
LOCKWAIT | VARCHAR2(8) | Address of lock waiting for; null if none |
STATUS | VARCHAR2(8) | Status of the session:
|
SERVER | VARCHAR2(9) | Server type (DEDICATED| SHARED| PSEUDO| NONE) |
SCHEMA# | NUMBER | Schema user identifier |
SCHEMANAME | VARCHAR2(30) | Schema user name |
OSUSER | VARCHAR2(30) | Operating system client user name |
PROCESS | VARCHAR2(12) | Operating system client process ID |
MACHINE | VARCHAR2(64) | Operating system machine name |
TERMINAL | VARCHAR2(30) | Operating system terminal name |
PROGRAM | VARCHAR2(48) | Operating system program name |
TYPE | VARCHAR2(10) | Session type |
SQL_ADDRESS | RAW(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_VALUE | NUMBER | Used 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_ID | VARCHAR2(13) | SQL identifier of the SQL statement that is currently being executed |
SQL_CHILD_NUMBER | NUMBER | Child number of the SQL statement that is currently being executed |
PREV_SQL_ADDR | RAW(4 | 8) | Used with PREV_HASH_VALUE to identify the last SQL statement executed |
PREV_HASH_VALUE | NUMBER | Used with SQL_HASH_VALUE to identify the last SQL statement executed |
PREV_SQL_ID | VARCHAR2(13) | SQL identifier of the last SQL statement executed |
PREV_CHILD_NUMBER | NUMBER | Child number of the last SQL statement executed |
MODULE | VARCHAR2(48) | Name of the currently executing module as set by calling the DBMS_APPLICATION_INFO.SET_MODULE procedure |
MODULE_HASH | NUMBER | Hash value of the above MODULE |
ACTION | VARCHAR2(32) | Name of the currently executing action as set by calling the DBMS_APPLICATION_INFO.SET_ACTION procedure |
ACTION_HASH | NUMBER | Hash value of the above action name |
CLIENT_INFO | VARCHAR2(64) | Information set by the DBMS_APPLICATION_INFO.SET_CLIENT_INFO procedure |
FIXED_TABLE_SEQUENCE | NUMBER | This 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# | NUMBER | Object ID for the table containing the row specified in ROW_WAIT_ROW# |
ROW_WAIT_FILE# | NUMBER | Identifier 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# | NUMBER | Identifier 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# | NUMBER | Current 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_TIME | DATE | Time of logon |
LAST_CALL_ET | NUMBER | If 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_ENABLED | VARCHAR2(3) | This column has been replaced by column PDML_STATUS |
FAILOVER_TYPE | VARCHAR2(13) | Indicates whether and to what extent transparent application failover (TAF) is enabled for the session:
|
FAILOVER_METHOD | VARCHAR2(10) | Indicates the transparent application failover method for the session:
|
FAILED_OVER | VARCHAR2(3) | Indicates whether the session is running in failover mode and failover has occurred (YES) or not (NO) |
RESOURCE_CONSUMER_GROUP | VARCHAR2(32) | Name of the session's current resource consumer group |
PDML_STATUS | VARCHAR2(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_STATUS | VARCHAR2(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_STATUS | VARCHAR2(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_DURATION | NUMBER | If queued (1), the current amount of time the session has been queued. If not currently queued, the value is 0. |
CLIENT_IDENTIFIER | VARCHAR2(64) | Client identifier of the session |
BLOCKING_SESSION_STATUS | VARCHAR2(11) | Blocking session status:
|
BLOCKING_INSTANCE | NUMBER | Instance identifier of blocking session |
BLOCKING_SESSION | NUMBER | Session identifier of blocking session |
SEQ# | NUMBER | Sequence number that uniquely identifies the wait. Incremented for each wait. |
EVENT# | NUMBER | Event number |
EVENT | VARCHAR2(64) | Resource or event for which the session is waiting |
P1TEXT | VARCHAR2(64) | Description of the first additional parameter |
P1 | NUMBER | First additional parameter ## File ID.. Join this with dba_extents view and col - File_id |
P1RAW | RAW(4) | First additional parameter |
P2TEXT | VARCHAR2(64) | Description of the second additional parameter |
P2 | NUMBER | Second additional parameter ## Block ID |
P2RAW | RAW(4) | Second additional parameter |
P3TEXT | VARCHAR2(64) | Description of the third additional parameter |
P3 | NUMBER | Third additional parameter |
P3RAW | RAW(4) | Third additional parameter |
WAIT_CLASS_ID | NUMBER | Identifier of the wait class |
WAIT_CLASS# | NUMBER | Number of the wait class |
WAIT_CLASS | VARCHAR2(64) | Name of the wait class |
WAIT_TIME | NUMBER | A 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_WAIT | NUMBER | If 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. |
STATE | VARCHAR2(19) | Wait state:
|
SERVICE_NAME | VARCHAR2(64) | Service name of the session |
SQL_TRACE | VARCHAR2(8) | Indicates whether SQL tracing is enabled (ENABLED) or disabled (DISABLED) |
SQL_TRACE_WAITS | VARCHAR2(5) | Indicates whether wait tracing is enabled (TRUE) or not (FALSE) |
SQL_TRACE_BINDS | VARCHAR2(5) | Indicates whether bind tracing is enabled (TRUE) or not (FALSE) |
Number | Command | Number | Command |
---|---|---|---|
1 | CREATE TABLE | 2 | INSERT |
3 | SELECT | 4 | CREATE CLUSTER |
5 | ALTER CLUSTER | 6 | UPDATE |
7 | DELETE | 8 | DROP CLUSTER |
9 | CREATE INDEX | 10 | DROP INDEX |
11 | ALTER INDEX | 12 | DROP TABLE |
13 | CREATE SEQUENCE | 14 | ALTER SEQUENCE |
15 | ALTER TABLE | 16 | DROP SEQUENCE |
17 | GRANT OBJECT | 18 | REVOKE OBJECT |
19 | CREATE SYNONYM | 20 | DROP SYNONYM |
21 | CREATE VIEW | 22 | DROP VIEW |
23 | VALIDATE INDEX | 24 | CREATE PROCEDURE |
25 | ALTER PROCEDURE | 26 | LOCK |
27 | NO-OP | 28 | RENAME |
29 | COMMENT | 30 | AUDIT OBJECT |
31 | NOAUDIT OBJECT | 32 | CREATE DATABASE LINK |
33 | DROP DATABASE LINK | 34 | CREATE DATABASE |
35 | ALTER DATABASE | 36 | CREATE ROLLBACK SEG |
37 | ALTER ROLLBACK SEG | 38 | DROP ROLLBACK SEG |
39 | CREATE TABLESPACE | 40 | ALTER TABLESPACE |
41 | DROP TABLESPACE | 42 | ALTER SESSION |
43 | ALTER USER | 44 | COMMIT |
45 | ROLLBACK | 46 | SAVEPOINT |
47 | PL/SQL EXECUTE | 48 | SET TRANSACTION |
49 | ALTER SYSTEM | 50 | EXPLAIN |
51 | CREATE USER | 52 | CREATE ROLE |
53 | DROP USER | 54 | DROP ROLE |
55 | SET ROLE | 56 | CREATE SCHEMA |
57 | CREATE CONTROL FILE | 59 | CREATE TRIGGER |
60 | ALTER TRIGGER | 61 | DROP TRIGGER |
62 | ANALYZE TABLE | 63 | ANALYZE INDEX |
64 | ANALYZE CLUSTER | 65 | CREATE PROFILE |
66 | DROP PROFILE | 67 | ALTER PROFILE |
68 | DROP PROCEDURE | 70 | ALTER RESOURCE COST |
71 | CREATE MATERIALIZED VIEW LOG | 72 | ALTER MATERIALIZED VIEW LOG |
73 | DROP MATERIALIZED VIEW LOG | 74 | CREATE MATERIALIZED VIEW |
75 | ALTER MATERIALIZED VIEW | 76 | DROP MATERIALIZED VIEW |
77 | CREATE TYPE | 78 | DROP TYPE |
79 | ALTER ROLE | 80 | ALTER TYPE |
81 | CREATE TYPE BODY | 82 | ALTER TYPE BODY |
83 | DROP TYPE BODY | 84 | DROP LIBRARY |
85 | TRUNCATE TABLE | 86 | TRUNCATE CLUSTER |
91 | CREATE FUNCTION | 92 | ALTER FUNCTION |
93 | DROP FUNCTION | 94 | CREATE PACKAGE |
95 | ALTER PACKAGE | 96 | DROP PACKAGE |
97 | CREATE PACKAGE BODY | 98 | ALTER PACKAGE BODY |
99 | DROP PACKAGE BODY | 100 | LOGON |
101 | LOGOFF | 102 | LOGOFF BY CLEANUP |
103 | SESSION REC | 104 | SYSTEM AUDIT |
105 | SYSTEM NOAUDIT | 106 | AUDIT DEFAULT |
107 | NOAUDIT DEFAULT | 108 | SYSTEM GRANT |
109 | SYSTEM REVOKE | 110 | CREATE PUBLIC SYNONYM |
111 | DROP PUBLIC SYNONYM | 112 | CREATE PUBLIC DATABASE LINK |
113 | DROP PUBLIC DATABASE LINK | 114 | GRANT ROLE |
115 | REVOKE ROLE | 116 | EXECUTE PROCEDURE |
117 | USER COMMENT | 118 | ENABLE TRIGGER |
119 | DISABLE TRIGGER | 120 | ENABLE ALL TRIGGERS |
121 | DISABLE ALL TRIGGERS | 122 | NETWORK ERROR |
123 | EXECUTE TYPE | 157 | CREATE DIRECTORY |
158 | DROP DIRECTORY | 159 | CREATE LIBRARY |
160 | CREATE JAVA | 161 | ALTER JAVA |
162 | DROP JAVA | 163 | CREATE OPERATOR |
164 | CREATE INDEXTYPE | 165 | DROP INDEXTYPE |
167 | DROP OPERATOR | 168 | ASSOCIATE STATISTICS |
169 | DISASSOCIATE STATISTICS | 170 | CALL METHOD |
171 | CREATE SUMMARY | 172 | ALTER SUMMARY |
173 | DROP SUMMARY | 174 | CREATE DIMENSION |
175 | ALTER DIMENSION | 176 | DROP DIMENSION |
177 | CREATE CONTEXT | 178 | DROP CONTEXT |
179 | ALTER OUTLINE | 180 | CREATE OUTLINE |
181 | DROP OUTLINE | 182 | UPDATE INDEXES |
183 | ALTER OPERATOR |
V$TRANSACTION - V$TRANSACTION lists the active transactions in the system.
Column | Datatype | Description |
---|---|---|
ADDR | RAW(4 | 8) | Address of the transaction state object == Join this with TADDR from v$session |
XIDUSN | NUMBER | Undo segment number |
XIDSLOT | NUMBER | Slot number |
XIDSQN | NUMBER | Sequence number |
UBAFIL | NUMBER | Undo block address (UBA) filenum |
UBABLK | NUMBER | UBA block number |
UBASQN | NUMBER | UBA sequence number |
UBAREC | NUMBER | UBA record number |
STATUS | VARCHAR2(16) | Status |
START_TIME | VARCHAR2(20) | Start time (wall clock) |
START_SCNB | NUMBER | Start system change number (SCN) base |
START_SCNW | NUMBER | Start SCN wrap |
START_UEXT | NUMBER | Start extent number |
START_UBAFIL | NUMBER | Start UBA file number |
START_UBABLK | NUMBER | Start UBA block number |
START_UBASQN | NUMBER | Start UBA sequence number |
START_UBAREC | NUMBER | Start UBA record number |
SES_ADDR | RAW(4 | 8) | User session object address ==## Join this with saddr of v$session |
FLAG | NUMBER | Flag |
SPACE | VARCHAR2(3) | YES if a space transaction |
RECURSIVE | VARCHAR2(3) | YES if a recursive transaction |
NOUNDO | VARCHAR2(3) | YES if a no undo transaction |
PTX | VARCHAR 2(3) | YES if parallel transaction |
NAME | VARCHAR2(256) | Name of a named transaction |
PRV_XIDUSN | NUMBER | Previous transaction undo segment number |
PRV_XIDSLT | NUMBER | Previous transaction slot number |
PRV_XIDSQN | NUMBER | Previous transaction sequence number |
PTX_XIDUSN | NUMBER | Rollback segment number of the parent XID |
PTX_XIDSLT | NUMBER | Slot number of the parent XID |
PTX_XIDSQN | NUMBER | Sequence number of the parent XID |
DSCN-B | NUMBER | This column is obsolete and maintained for backward compatibility. The value of this column is always equal to the value in DSCN_BASE. |
DSCN-W | NUMBER | This column is obsolete and maintained for backward compatibility. The value of this column is always equal to the value in DSCN_WRAP. |
USED_UBLK | NUMBER | Number of undo blocks used |
USED_UREC | NUMBER | Number of undo records used |
LOG_IO | NUMBER | Logical I/O |
PHY_IO | NUMBER | Physical I/O |
CR_GET | NUMBER | Consistent gets |
CR_CHANGE | NUMBER | Consistent changes |
START_DATE | DATE | Start time (wall clock) |
DSCN_BASE | NUMBER | Dependent SCN base |
DSCN_WRAP | NUMBER | Dependent SCN wrap |
START_SCN | NUMBER | Start SCN |
DEPENDENT_SCN | NUMBER | Dependent SCN |
XID | RAW(8) | Transaction XID |
PRV_XID | RAW(8) | Previous transaction XID |
PTX_XID | RAW(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.Column | Datatype | Description |
---|---|---|
ADDR | RAW(4 | 8) | Address of process state object ## join to PADDR from V$SESSION |
PID | NUMBER | Oracle process identifier |
SPID | VARCHAR2(12) | Operating system process identifier |
USERNAME | VARCHAR2(15) | Operating system process username. Any two-task user coming across the network has "-T" appended to the username. |
SERIAL# | NUMBER | Process serial number |
TERMINAL | VARCHAR2(30) | Operating system terminal identifier |
PROGRAM | VARCHAR2(48) | Program in progress |
TRACEID | VARCHAR2(255) | Trace file identifier |
BACKGROUND | VARCHAR2(1) | 1 for a background process; NULL for a normal process |
LATCHWAIT | VARCHAR2(8) | Address of latch the process is waiting for; NULL if none |
LATCHSPIN | VARCHAR2(8) | Address of the latch the process is spinning on; NULL if none |
PGA_USED_MEM | NUMBER | PGA memory currently used by the process |
PGA_ALLOC_MEM | NUMBER | PGA memory currently allocated by the process (including free PGA memory not yet released to the operating system by the server process) |
PGA_FREEABLE_MEM | NUMBER | Allocated PGA memory which can be freed |
PGA_MAX_MEM | NUMBER | Maximum 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
Column | Datatype | Description |
---|---|---|
SID | NUMBER | Session identifier |
SERIAL# | NUMBER | Session serial number |
OPNAME | VARCHAR2(64) | Brief description of the operation |
TARGET | VARCHAR2(64) | The object on which the operation is carried out |
TARGET_DESC | VARCHAR2(32) | Description of the target |
SOFAR | NUMBER | The units of work done so far |
TOTALWORK | NUMBER | The total units of work |
UNITS | VARCHAR2(32) | The units of measurement |
START_TIME | DATE | The starting time of operation |
LAST_UPDATE_TIME | DATE | Time when statistics last updated |
TIMESTAMP | DATE | Timestamp |
TIME_REMAINING | NUMBER | Estimate (in seconds) of time remaining for the operation to complete |
ELAPSED_SECONDS | NUMBER | The number of elapsed seconds from the start of operations |
CONTEXT | NUMBER | Context |
MESSAGE | VARCHAR2(512) | Statistics summary message |
USERNAME | VARCHAR2(30) | User ID of the user performing the operation |
SQL_ADDRESS | RAW(4 | 8) | Used with the value of the SQL_HASH_VALUE column to identify the SQL statement associated with the operation |
SQL_HASH_VALUE | NUMBER | Used with the value of the SQL_ADDRESS column to identify the SQL statement associated with the operation |
SQL_ID | VARCHAR2(13) | SQL identifier of the SQL statement associated with the operation |
QCSID | NUMBER | Session 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.
Column | Datatype | Description |
---|---|---|
STATISTIC# | NUMBER | Statistic 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. |
NAME | VARCHAR2(64) | Statistic name |
CLASS | NUMBER | A number representing one or more statistics classes. The following class numbers are additive:
|
STAT_ID | NUMBER | Identifier 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.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
This view lists 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... 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. |
NAME | VARCHAR2(64) | Statistic name |
CLASS | NUMBER | A number representing one or more statistics class. The following class numbers are additive:
|
VALUE | NUMBER | Statistic value |
STAT_ID | NUMBER | Identifier 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.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$SQL_TEXT 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. The value is 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 theEND_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 is executed |
OPTIMIZER_COST | NUMBER | Cost of this query given by the optimizer |
OPTIMIZER_ENV | RAW(691) | 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 | Numerical 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 SERVICE |
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 fails 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:
|
LITERAL_HASH_VALUE | NUMBER | Hash 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_TIME | VARCHAR2(19) | Time at which the query plan (heap 6) 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. |
CHILD_LATCH | NUMBER | Child latch number that is protecting the cursor |
SQL_PROFILE | VARCHAR2(64) | SQL profile |
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 | The 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 |
V$LOCK
This view lists the locks currently held by the Oracle Database and outstanding requests for a lock or latch.Column | Datatype | Description |
---|---|---|
ADDR | RAW(4 | 8) | Address of lock state object |
KADDR | RAW(4 | 8) | Address of lock |
SID | NUMBER | Identifier for session holding or acquiring the lock ## join with SID from V$SESSION |
TYPE | VARCHAR2(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. |
ID1 | NUMBER | Lock identifier #1 (depends on type) ## Join with OBJECT_ID from dba_objects |
ID2 | NUMBER | Lock identifier #2 (depends on type) |
LMODE | NUMBER | Lock mode in which the session holds the lock:
|
REQUEST | NUMBER | Lock mode in which the process requests the lock:
|
CTIME | NUMBER | Time since current mode was granted |
BLOCK | NUMBER | The lock is blocking another lock |
System Type | Description | System Type | Description |
---|---|---|---|
BL | Buffer hash table instance | NA..NZ | Library cache pin instance (A..Z = namespace) |
CF | Control file schema global enqueue | PF | Password File |
CI | Cross-instance function invocation instance | PI, PS | Parallel operation |
CU | Cursor bind | PR | Process startup |
DF | Data file instance | QA..QZ | Row cache instance (A..Z = cache) |
DL | Direct loader parallel index create | RT | Redo thread global enqueue |
DM | Mount/startup db primary/secondary instance | SC | System change number instance |
DR | Distributed recovery process | SM | SMON |
DX | Distributed transaction entry | SN | Sequence number instance |
FS | File set | SQ | Sequence number enqueue |
HW | Space management operations on a specific segment | SS | Sort segment |
IN | Instance number | ST | Space transaction enqueue |
IR | Instance recovery serialization global enqueue | SV | Sequence number value |
IS | Instance state | TA | Generic enqueue |
IV | Library cache invalidation instance | TS | Temporary segment enqueue (ID2=0) |
JQ | Job queue | TS | New block allocation enqueue (ID2=1) |
KK | Thread kick | TT | Temporary table enqueue |
LA .. LP | Library cache lock instance lock (A..P = namespace) | UN | User name |
MM | Mount definition global enqueue | US | Undo segment DDL |
MR | Media recovery | WL | Being-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.
Column | Datatype | Description |
---|---|---|
SQL_TEXT | VARCHAR2(1000) | First thousand characters of the SQL text for the current cursor |
SQL_FULLTEXT | CLOB | All characters of the SQL text for the current cursor |
SQL_ID | VARCHAR2(13) | SQL identifier of the parent cursor in the library cache |
SHARABLE_MEM | NUMBER | Amount 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_MEM | NUMBER | Fixed 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_MEM | NUMBER | Fixed 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. |
SORTS | NUMBER | Sum of the number of sorts that were done for all the child cursors |
VERSION_COUNT | NUMBER | Number of child cursors that are present in the cache under this parent |
LOADED_VERSIONS | NUMBER | Number of child cursors that are present in the cache and have their context heap (KGL heap 6) loaded |
OPEN_VERSIONS | NUMBER | The number of child cursors that are currently open under this current parent |
USERS_OPENING | NUMBER | Number of users that have any of the child cursors open |
FETCHES | NUMBER | Number of fetches associated with the SQL statement |
EXECUTIONS | NUMBER | Total number of executions, totalled over all the child cursors |
PX_SERVERS_EXECUTIONS | NUMBER | Total number of executions performed by Parallel eXecution Servers. The value is 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 | Total number of users executing the statement over all child cursors |
LOADS | NUMBER | Number of times the object was loaded or reloaded |
FIRST_LOAD_TIME | VARCHAR2(19) | Timestamp of the parent creation time |
INVALIDATIONS | NUMBER | Total number of invalidations over all the child cursors |
PARSE_CALLS | NUMBER | Sum of all parse calls to all the child cursors under this parent |
DISK_READS | NUMBER | Sum of the number of disk reads over all child cursors |
DIRECT_WRITES | NUMBER | Sum of the number of direct writes over all child cursors |
BUFFER_GETS | NUMBER | Sum of buffer gets over all child cursors |
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 processed on behalf of this SQL statement |
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(703) | Optimizer environment |
OPTIMIZER_ENV_HASH_VALUE | NUMBER | Hash value for the optimizer environment |
PARSING_USER_ID | NUMBER | User ID of the user that has parsed the very first cursor under this parent |
PARSING_SCHEMA_ID | NUMBER | Schema ID that was used to parse this child cursor |
PARSING_SCHEMA_NAME | VARCHAR2(30) | Schema name that was used to parse this child cursor |
KEPT_VERSIONS | NUMBER | Number of child cursors that have been marked to be kept using the DBMS_SHARED_POOLpackage |
ADDRESS | RAW(4 | 8) | Address of the handle to the parent for this 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 | Numerical 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) |
MODULE | VARCHAR2(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_HASH | NUMBER | Hash value of the module that is named 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 as set by calling DBMS_APPLICATION_INFO.SET_ACTION |
ACTION_HASH | NUMBER | Hash value of the action that is named in the ACTION column |
SERIALIZABLE_ABORTS | NUMBER | Number of times the transaction fails to serialize, producing ORA-08177 errors, totalled over all the child cursors |
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 | VARCHAR2(40) | Outline session identifier |
LAST_ACTIVE_CHILD_ADDRESS | RAW(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) |
REMOTE | VARCHAR2(1) | Indicates whether the cursor is remote mapped (Y) or not (N) |
OBJECT_STATUS | VARCHAR2(19) | Status of the cursor:
|
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 | DATE | Time at which the query plan (heap 6) 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. |
CHILD_LATCH | NUMBER | Child latch number that is protecting the cursor |
SQL_PROFILE | VARCHAR2(64) | SQL profile |
PROGRAM_ID | NUMBER | Program identifier |
PROGRAM_LINE# | NUMBER | Program line number |
EXACT_MATCHING_SIGNATURE | NUMBER | The signature used when the CURSOR_SHARING parameter is set to EXACT |
FORCE_MATCHING_SIGNATURE | NUMBER | The 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 |
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.
Column | Datatype | Description |
---|---|---|
SID | NUMBER | Session ID (same as in V$SESSION) ## join with sid from v$session |
STAT_ID | NUMBER | Statistic identifier for the time statistic |
STAT_NAME | VARCHAR2(64) | Name of the statistic (see Table below ) |
VALUE | NUMBER | Amount of time (in microseconds) that the session has spent in this operation |
Tabl V$SESS_TIME_MODEL and V$SYS_TIME_MODEL Statistics
Statistic Name | Description | ||
---|---|---|---|
DB Time | Amount 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 CPU | Amount 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 time | Amount of CPU time (in microseconds) consumed by database background processes. | ||
sequenceload elapsed time | Amount 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 elapsed | Amount of elapsed time spent parsing SQL statements. It includes both soft and hard parse time. | ||
hard parse elapsed time | Amount of elapsed time spent hard parsing SQL statements. | ||
sql executeelapsed time | Amount 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 time | Amount of elapsed time spent performing session connect and disconnect calls. | ||
failed parse elapsed time | Amount of time spent performing SQL parses which ultimately fail with some parse error. | ||
hard parse (sharing criteria) elapsed time | Amount 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 time | Amount 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 time | Amount 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 time | Amount of elapsed time spent running the PL/SQL compiler. | ||
inboundPL/SQL rpc elapsed time | Time 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