Product Documentation

SQL Operations Guide

Previous Topic

Next Topic

Logging FairCom DB SQL Query Times

A FairCom DB SQL feature is available to log query start and end times as an additional aid for tuning and performance monitoring. The query times are output to the file sql_server.log.

The output is controlled by two server configuration keywords and specified in the file ctsrvr.cfg.

SQL_DEBUG LOG_STMT_TIMES

This option logs start and end times for the statement PREPARE, EXECUTE and OPEN operations.

SQL_DEBUG LOG_STMT_TIMES_FETCH

This option logs start and end times of a fetch sequence (open cursor, all fetches, and close cursor).

Both options can be specified at the same time. The actual log entry occurs when the query operation is finished.

Example Output

Start: Thu Mar 09 13:50:12 2006

- User# 00014 Elapsed: 0 sec. for PREPARE select top 5000 * from facility

Start: Thu Mar 09 13:50:12 2006

- User# 00014 Elapsed: 0 sec. for OPEN select top 5000 * from facility

Start: Thu Mar 09 13:50:12 2006

- User# 00014 Elapsed: 2 sec. for FETCH select top 5000 * from facility

TOCIndex