SQL/MX 3.2 Management Manual (H06.25+, J06.14+)

Table Of Contents
With the statistics generated by SET STATISTICS ON or by DISPLAY STATISTICS, you can quickly
monitor the performance of a specific statement on specific objects. The information can help you:
Determine the comparative performance of similar objects. For instance, you can determine
the effect of a new index on a table compared to the performance without the index, or you
can determine the performance after an UPDATE STATISTICS statement.
Display the statistics of various queries or DML statements.
Monitor the estimated cost of a compiled statement or an ad hoc query. The larger the estimated
cost, the number of system resources used will be more, and this may impact the execution
time. You can then investigate costly SQL statements for additional indexes, for out-of-date
statistics on referenced tables, or for poorly designed queries.
Measure Performance Measurement Tool
Use the Measure product to collect statistical information on SQL database objects and SQL
processes (host language programs with SQL statements) and to generate reports. You select a
process for measurement by specifying the process in a Measure ADD command in effect when
the process executes. For example:
+add process *
+add sqlstmt *
+startmyfile, interval 5 minutes, for 2 hours, oss, sql
You can then use LIST command to abridge listings of individual processes and SQLSTMTs during
output.
You can collect performance statistics for SQL/MX objects by using these Measure entities:
SQLPROC provides information about an SQL process. There is one SQLPROC counter record
per SQL process selected.
SQLSTMT provides information about all SQL statements within an SQL process. There is one
SQLSTMT counter record per SQL statement of a selected SQL process.
NOTE: A SQLSTMT record is created when at the beginning of the processing of a SQL
statement, SQL invokes a Measure interface to check if SQL statements are required. If the
SQL statements are required, SQL invokes the API to set up the measure records. This means
that SQLSTMTs of processes that are already active when a measurement is started might not
get reported.
FILE enables an SQL database object to be selected to accumulate information about file
activities.
Figure 5 (page 285) illustrates Measure entities and corresponding program structures for SQL
processes.
284 Measuring Performance