V$SQL_HISTORY
V$SQL_HISTORY displays SQL statements tracked by SQL history monitoring.
This view is populated only when the SQL_HISTORY_ENABLED initialization parameter is set to true.
| Column | Datatype | Description |
|---|---|---|
KEY |
NUMBER |
Artificial key to efficiently read a specific SQL history data entry For internal use only. |
SQL_ID |
VARCHAR2(13) |
SQL identifier of the SQL statement |
ELAPSED_TIME |
NUMBER |
Elapsed time (in microseconds) for the SQL statement |
CPU_TIME |
NUMBER |
CPU time (in microseconds) for the SQL statement |
BUFFER_GETS |
NUMBER |
Number of buffer get operations for the SQL statement |
IO_INTERCONNECT_BYTES |
NUMBER |
Number of I/O bytes exchanged between Oracle AI Database and the storage system for the SQL statement |
PHYSICAL_READ_REQUESTS |
NUMBER |
Number of physical read I/O requests issued by the SQL statement |
PHYSICAL_READ_BYTES |
NUMBER |
Number of bytes read from disk by the SQL statement |
PHYSICAL_WRITE_REQUESTS |
NUMBER |
Number of physical write I/O requests issued by the SQL statement |
PHYSICAL_WRITE_BYTES |
NUMBER |
Number of bytes written to disk by the SQL statement |
PLSQL_EXEC_TIME |
NUMBER |
PL/SQL execution time (in microseconds) for the SQL statement |
JAVA_EXEC_TIME |
NUMBER |
Java execution time (in microseconds) for the SQL statement |
CLUSTER_WAIT_TIME |
NUMBER |
Cluster wait time (in microseconds) for the SQL statement |
CONCURRENCY_WAIT_TIME |
NUMBER |
Concurrency wait time (in microseconds) for the SQL statement |
APPLICATION_WAIT_TIME |
NUMBER |
Application wait time (in microseconds) for the SQL statement |
USER_IO_WAIT_TIME |
NUMBER |
User I/O Wait Time (in microseconds) for the SQL statement |
IO_CELL_UNCOMPRESSED_BYTES |
NUMBER |
Number of uncompressed bytes (that is, size after decompression) that are offloaded to the Exadata cells for the SQL statement See Also: Oracle Exadata Storage Server Software documentation for more information |
IO_CELL_OFFLOAD_ELIGIBLE_BYTES |
NUMBER |
Number of I/O bytes that can be filtered by the Exadata storage system for the SQL statement See Also: Oracle Exadata Storage Server Software documentation for more information |
SQL_TEXT |
VARCHAR2(100) |
Up to the first 100 characters of the text of the SQL statement |
PLAN_HASH_VALUE |
NUMBER |
SQL plan hash value |
SQL_EXEC_ID |
NUMBER |
SQL execution identifier |
SQL_EXEC_START |
DATE |
Time at which the SQL statement execution started |
LAST_ACTIVE_TIME |
DATE |
Time at which the SQL statement execution was last active |
SESSION_USER# |
NUMBER |
Unique ID number for the session user who issued the SQL statement |
CURRENT_USER# |
NUMBER |
Unique number identifying the current user |
CHILD_NUMBER |
NUMBER |
Child number of the SQL statement |
SID |
NUMBER |
Session ID for the SQL statement’s session |
SESSION_SERIAL# |
NUMBER |
Session serial number for the SQL statement’s session |
MODULE_HASH |
NUMBER |
Hash value for the module name corresponding to the executing session |
ACTION_HASH |
NUMBER |
Hash value for the action name corresponding to the executing session |
SERVICE_HASH |
NUMBER |
Hash value for the service name corresponding to the executing session |
IS_FULL_SQLTEXT |
VARCHAR2(1) |
Indicates whether the SQL_TEXT column displays the entire SQL text (Y) or not (N) |
ERROR_SIGNALLED |
VARCHAR2(1) |
Indicates whether the SQL statement generated an error (Y) or not (N) |
ERROR_NUMBER |
NUMBER |
If the SQL statement failed to execute, the error number (for example, 932 for error ORA-00932) |
ERROR_FACILITY |
VARCHAR2(4) |
If the SQL statement failed to execute, the error facility (for example, ORA for error ORA-00932) |
STATEMENT_TYPE |
VARCHAR2(5) |
Type of SQL statement:
|
IS_PARALLEL |
VARCHAR2(1) |
Indicates whether the SQL ran as a parallel execution (Y) or not (N) |
CON_ID |
NUMBER |
The ID of the container to which the data pertains. Possible values include:
|
Note: This view is available starting with Oracle AI Database 26ai.
See Also: “SQL_HISTORY_ENABLED”