To check detailed time information related to query execution, TIMED_STATISTICS should be activated (1) by default. To Monitor only information about a specific session, add the 'session_id' column of v$statement to the WHERE clause.
How to activate TIMED_STATISTICS
TIMED_STATISTICS is an Altibase server property that is supported starting from Altibase v5.
When TIMED_STATISTICS is activated, time information of queries performed after activation can be known.
- Main Column Description
Column | Description |
---|---|
STMT_ID | Query ID |
TX_ID | ID of the transaction that executed the query |
PREPARE_TIME | The time taken to perform prepare (parse, validation, optimization) is seconds. This is updated whenever a query is performed. TIMED_STATISTICS must be enabled for viewing. |
FETCH_TIME | The time taken to execute execution after preparation is completed, and is updated whenever a query is executed. It is used as a criterion for query timeout and the unit is second. TIMED_STATISTICS must be enabled for viewing. |
EXECUTE_TIME | The time it takes for the client to fetch the results of the query. Depending on the size of the result, one query can perform multiple fetches and is updated each time. This becomes the standard of fetch_timeout and the unit is second. TIMED_STATISTICS must be enabled for viewing. |
TOTAL_TIME | The sum of time spent for one query to be executed, and includes all of prepare, fetch, and execution. This is updated every time the query is executed, and the unit is seconds. TIMED_STATISTICS must be enabled for viewing. |
EXECUTE_FLAG | If this value is 0, it is prepared only, and if it is 1, it is executing. |
LAST_START_TIME | The time at which the most recently executed query was performed, and the unit is the Unix time. |
For column description, please refer to 'Main Column Description'.
Long-running Query Execution Information
This shows query information being executed for over 600 seconds.
For column description, please refer to 'Main Column Description'.
This shows the last query information of a transaction that has been running for 3600 seconds or longer.
Main Column Description
For the description of other columns, refer to 'Main Column Description' above.
Column | Description |
---|---|
UTRANS_TIME | The elapsed time up to the present based on the time when the transaction first started changing operation. It becomes the standard of UTRANS_TIME and the unit is second. For reference, the base_time of v$sessionmgr and the first_update_time of v$transaction for calculating this value is updated without activating (0) the TIMED_STATISTICS property. |
Full Scan Query Information
For the description of other columns, refer to 'Main Column Description' above.
Main Column Description
Column | Description |
---|---|
EXECUTE_CNT | Total number of queries executed successfully. |
Main Column Description
Column | Description |
---|---|
CURR_STMT_CNT_PER_SESSION | The number of statements managed by the session |