Monitoring your queries using Start Database Monitor (STRDBMON)

 

Start Database Monitor (STRDBMON) command gathers information about a query in real time and stores this information in an output table. This information can help you determine whether your system and your queries are performing as they should, or whether they need fine tuning. Database monitors can generate significant CPU and disk storage overhead when in use.

You can gather performance information for a specific query, for every query on the server, or for a group of queries on the server. When a job is monitored by multiple monitors, each monitor is logging rows to a different output table. You can identify rows in the output database table by each row's unique identification number.

 

What kinds of statistics you can gather

The database monitor provides the same information that is provided with the query optimizer debug messages (Start Debug (STRDBG)) and the Print SQL information (PRTSQLINF) command. The following is a sampling of the additional information that will be gathered by the database monitors:

 

How you can use performance statistics

You can use these performance statistics to generate various reports. For instance, you can include reports that show queries that:

A query that is canceled by an end request generally does not generate a full set of performance statistics. However, it does contain all the information about how a query was optimized, with the exception of runtime or multi-step query information.

 

Parent topic:

Optimizing query performance using query optimization tools

 

Related information


Start Debug (STRDBG) command
Print SQL Information (PRTSQLINF) command
Start Database Monitor (STRDBMON) command