Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » Tables » Diagnostic tracing tables

sa_diagnostic_query table Next Page

sa_diagnostic_request table


The sa_diagnostic_request table is owned by the dbo user, and is the master table for all requests. A request is an event related to query processing and generally includes:

There are two versions of this table: sa_diagnostic_request and sa_tmp_diagnostic_request.

Columns
Column name Column type Column constraint Table constraints
logging_session_idUNSIGNED INTNOT NULL

Primary key.

Foreign key references sa_diagnostic_connection.

Foreign key references sa_diagnostic_cursor.

Foreign key references sa_diagnostic_query.

Foreign key references sa_diagnostic_statement.

request_idUNSIGNED BIGINTNOT NULLPrimary key.
start_timeTIMESTAMPNOT NULL
finish_timeTIMESTAMPNOT NULL
duration_msUNSIGNED INTNOT NULL
connection_numberUNSIGNED INT

Foreign key references sa_diagnostic_connection.

request_typeUNSIGNED SMALLINT
statement_idUNSIGNED BIGINT

Foreign key references sa_diagnostic_statement.

query_idUNSIGNED BIGINT

Foreign key references sa_diagnostic_query.

cursor_idUNSIGNED BIGINT

Foreign key references sa_diagnostic_cursor.

sql_codeSMALLINT

logging_session_id    The logging session during which the request occurred.

request_id    A number uniquely identifying the request.

start_time    The time at which the event started.

finish_time    For statement execution, the time when the statement completed; otherwise, NULL.

duration_ms    The duration of the event in milliseconds.

connection_number    The ID of the connection that caused the event to happen.

request_type    The type of request. Values include:

ValueDescription
1Start of new tracing session
2Statement execution
3Cursor open
4Cursor close
5Connect
6Disconnect

statement_id    If the event was statement-related, the ID assigned to the statement for tracing purposes.

query_id    If the event was query-related, the ID assigned to the query for tracing purposes.

cursor_id    If the event was cursor-related, the ID assigned to the cursor for tracing purposes.

sql_code     Since rows in this table represent operations on statements, cursors, or queries, most return a SQL code. This column contains the SQL code returned. If a SQL code of 0 is returned, the column contains NULL.