Contents Index sa_get_request_profile system procedure sa_get_server_messages system procedure

ASA SQL Reference
  System Procedures and Functions
    System and catalog stored procedures

sa_get_request_times system procedure


Function 

Analyses the request-level log to determine statement execution times.

Syntax 

sa_get_request_times ( [ request-log-filename [, connection-id ] ] )

Permissions 

DBA authority required.

Side effects 

Automatic commit.

See also 

sa_get_request_profile system procedure

sa_statement_text system procedure

sa_server_option system procedure

Description 

This procedure reads the specified request-level log and populates the global temporary table satmp_request_time with the statements from the log and their execution times.

For statements such as inserts and updates, the execution time is straightforward. For queries, the time is calculated for preparing the statement to dropping it, including describing it, opening a cursor, fetching rows, and closing the cursor. For most queries, this is an accurate reflection of the amount of time taken. In cases where the cursor is left open while other actions are performed, the time appears as a large value but is not a true indication that the query is costly.

This procedure recognizes host variables and populates the global temporary table satmp_request_hostvar with the statements from the log and their execution times. For older databases where this temporary table does not exist, host variable values are ignored.

If you do not specify a log file, the default is the current log file that is specified at the command prompt with -zo, or that has been specified by

sa_server_option( 'request_level_log_file'filename )

If a connection id is specified, it is used to filter information from the log so that only requests for that connection are retrieved.


Contents Index sa_get_request_profile system procedure sa_get_server_messages system procedure