You can start a summary monitor from the iSeries™ Navigator interface.
You can start this monitor by right-clicking SQL Performance Monitors
under the Database portion of the iSeries Navigator tree and selecting .
In the monitor wizard, select Summary.
When you create a summary
monitor, certain kinds of information are always collected. This information
includes summary information, SQL statement information, and host variable
information. You can also choose to collect the following types of information:
- Table scans and arrival sequences
- Select to include information about table scan data for the monitored
jobs. Table scans of large tables can be time-consuming. If the SQL statement
is long running, it may indicate that an index might be necessary to improve
performance.
- Indexes used
- Select to include information about how indexes are used by monitored
jobs. This information can be used to quickly tell if any of the permanent
indexes were used to improve the performance of a query. Permanent indexes
are typically necessary to achieve optimal query performance. This information
can be used to determine how often a permanent index was used by in the statements
that were monitored. Indexes that are never (or very rarely) used should probably
be dropped to improve the performance of inserts updates and deletes to a
table. Before dropping the index, you may want to determine if the index is
being used by the query optimizer as a source of statistics.
- Index creation
- Select to include information about the creation of indexes by monitored
jobs. Temporary indexes may need to be created for several reasons such as
to perform a join, to support scrollable cursors, to implement ORDER BY or
GROUP BY, and so on. The created indexes may only contain keys for rows that
satisfy the query (such indexes are known as sparse indexes). In many cases,
the index create may be perfectly normal and the most efficient way to perform
the query. However, if the number of rows is large, or if the same index is
repeatedly created, you may be able to create a permanent index to improve
performance of this query. This may be true whether an index was advised.
- Data sorts
- Select to include information about data sorts that monitored jobs perform.
Sorts of large result sets in an SQL statement may be a time consuming operation.
In some cases, an index can be created that will eliminate the need for a
sort.
- Temporary file use
- Select to include information about temporary files that monitored jobs
created. Temporary results are sometimes necessary based on the SQL statement.
If the result set inserted into a temporary result is large, you may want
to investigate why the temporary result is necessary. In some cases, the SQL
statement can be modified to eliminate the need for the temporary result.
For example, if a cursor has an attribute of INSENSITIVE, a temporary result
will be created. Eliminating the keyword INSENSITIVE will typically remove
the need for the temporary result, but your application will then see changes
as they are occur in the database tables.
- Indexes considered
- Select to include information about which indexes were considered for
the monitored jobs. This information can help to determine if an index is
used in the query. If an index was considered, but not used, you might need
to rewrite the index or drop it. Before dropping the index, you may want to
determine if the index is being used by the query optimizer as a source of
statistics.
- Subselect processing
- Select to include information about subselect processing. This information
can indicate which subquery in a complex SQL statement is the most expensive.
You can choose which jobs you want to monitor or choose to monitor
all jobs. You can have multiple instances of monitors running on you system
at one time. For summary monitors, only one monitor instance can be monitoring
all jobs. Additionally, you cannot have two monitors monitoring the same job.
When collecting information for all jobs, the monitor will collect on previously
started jobs or new jobs started after the monitor is created. You can edit
this list by selecting and removing jobs from the Selected jobs list.