MON$STATEMENTS
MON$STATEMENTS
displays statements prepared for execution.
Column Name | Data Type | Description |
---|---|---|
|
|
Statement identifier |
|
|
Connection identifier |
|
|
Transaction identifier |
|
|
Statement state:
|
|
|
The date and time when the statement was prepared |
|
|
Statement text in SQL |
|
|
Statistics identifier |
|
|
Explained execution plan |
|
|
Connection-level statement timeout in milliseconds.When |
|
|
Statement timer expiration time |
|
|
Compiled statement id |
The STALLED state indicates that, at the time of the snapshot, the statement had an open cursor and was waiting for the client to resume fetching rows.
SELECT
ATT.MON$USER,
ATT.MON$REMOTE_ADDRESS,
STMT.MON$SQL_TEXT,
STMT.MON$TIMESTAMP
FROM MON$ATTACHMENTS ATT
JOIN MON$STATEMENTS STMT ON ATT.MON$ATTACHMENT_ID = STMT.MON$ATTACHMENT_ID
WHERE ATT.MON$ATTACHMENT_ID <> CURRENT_CONNECTION
AND STMT.MON$STATE = 1