ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzajq_5.4.0.1/dms.htm

126 lines
8.4 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Monitoring your queries using Start Database Monitor (STRDBMON)" />
<meta name="abstract" content="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." />
<meta name="description" content="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." />
<meta name="DC.subject" content="monitoring, database query performance, query performance, performance, monitoring query" />
<meta name="keywords" content="monitoring, database query performance, query performance, performance, monitoring query" />
<meta name="DC.Relation" scheme="URI" content="queryopt.htm" />
<meta name="DC.Relation" scheme="URI" content="strdbmon.htm" />
<meta name="DC.Relation" scheme="URI" content="endbmon.htm" />
<meta name="DC.Relation" scheme="URI" content="dbmonperfrows.htm" />
<meta name="DC.Relation" scheme="URI" content="dbmonexamples.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/strdbg.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/prtsqlinf.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/strdbmon.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="dms" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Monitoring your queries using Start Database Monitor (STRDBMON)</title>
</head>
<body id="dms"><a name="dms"><!-- --></a>
<img src="./delta.gif" alt="Start of change" /><!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Monitoring your queries using Start Database Monitor (STRDBMON)</h1>
<div><p><span class="cmdname">Start Database Monitor (STRDBMON)</span> 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.</p>
<div class="section"><p>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.</p>
</div>
<div class="section"><h4 class="sectiontitle">What kinds of statistics you can gather</h4><p>The database
monitor provides the same information that is provided with the query optimizer
debug messages (<span class="cmdname">Start Debug (STRDBG)</span>) and the <span class="cmdname">Print
SQL information (PRTSQLINF)</span> command. The following is a sampling
of the additional information that will be gathered by the database monitors: </p>
<ul><li>System and job name</li>
<li>SQL statement and sub-select number</li>
<li>Start and end timestamp</li>
<li>Estimated processing time</li>
<li>Total rows in table queried</li>
<li>Number of rows selected</li>
<li>Estimated number of rows selected</li>
<li>Estimated number of joined rows</li>
<li>Key columns for advised index</li>
<li>Total optimization time</li>
<li>Join type and method</li>
<li>ODP implementation</li>
</ul>
</div>
<div class="section"><h4 class="sectiontitle">How you can use performance statistics</h4><p>You can use
these performance statistics to generate various reports. For instance, you
can include reports that show queries that: </p>
<ul><li>Use an abundance of the server resources.</li>
<li>Take an extremely long time to execute.</li>
<li>Did not run because of the query governor time limit.</li>
<li>Create a temporary index during execution</li>
<li>Use the query sort during execution</li>
<li>Might perform faster with the creation of a keyed logical file containing
keys suggested by the query optimizer.</li>
</ul>
<div class="note"><span class="notetitle">Note:</span> 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.</div>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="strdbmon.htm">Start Database Monitor (STRDBMON) command</a></strong><br />
The <span class="cmdname">Start Database Monitor (STRDBMON)</span> command
starts the collection of database performance statistics for a specified
job, for all jobs on the system or for a selected set of jobs. The statistics
are placed in a user-specified database table and member. If the table or
member do not exist, one is created based on the QAQQDBMN table in library
QSYS. If the table and member do exist, the record format of the specified
table is verified to insure it is the same.</li>
<li class="ulchildlink"><strong><a href="endbmon.htm">End Database Monitor (ENDDBMON) command</a></strong><br />
The <span class="cmdname">End Database Monitor (ENDDBMON)</span> command
ends the collection of database performance statistics for a specified job,
all jobs on the system or a selected set of jobs (for example, a generic job
name).</li>
<li class="ulchildlink"><strong><a href="dbmonperfrows.htm">Database monitor performance rows</a></strong><br />
The rows in the database table are uniquely identified by their
row identification number. The information within the file-based monitor (<span class="cmdname">Start
Database Monitor (STRDBMON)</span>) is written out based upon
a set of logical formats which are defined in the Database Monitor formats.
These views correlate closely to the debug messages and the <span class="cmdname">Print
SQL Information (PRSQLINF)</span> messages.</li>
<li class="ulchildlink"><strong><a href="dbmonexamples.htm">Database monitor examples</a></strong><br />
The iSeries™ navigator
interface provides a powerful tool for gathering and analyzing performance
monitor data using database monitor. However, you may want to do your own
analysis of the database monitor files.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="queryopt.htm" title="Query optimization is an iterative process. You can gather performance information about your queries and control the processing of your queries.">Optimizing query performance using query optimization tools</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../cl/strdbg.htm">Start Debug (STRDBG) command</a></div>
<div><a href="../cl/prtsqlinf.htm">Print SQL Information (PRTSQLINF) command</a></div>
<div><a href="../cl/strdbmon.htm">Start Database Monitor (STRDBMON) command</a></div>
</div>
</div>
<img src="./deltaend.gif" alt="End of change" /></body>
</html>