89 lines
6.6 KiB
HTML
89 lines
6.6 KiB
HTML
|
<?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="concept" />
|
||
|
<meta name="DC.Title" content="Statistics Manager" />
|
||
|
<meta name="abstract" content="In releases before V5R2, the retrieval of statistics was a function of the Optimizer. When the Optimizer needed to know information about a table, it looked at the table description to retrieve the row count and table size. If an index was available, the Optimizer might then extract further information about the data in the table. In V5R2, the collection of statistics was removed from the Optimizer and is now handled by a separate component called the Statistics Manager." />
|
||
|
<meta name="description" content="In releases before V5R2, the retrieval of statistics was a function of the Optimizer. When the Optimizer needed to know information about a table, it looked at the table description to retrieve the row count and table size. If an index was available, the Optimizer might then extract further information about the data in the table. In V5R2, the collection of statistics was removed from the Optimizer and is now handled by a separate component called the Statistics Manager." />
|
||
|
<meta name="DC.subject" content="statistics manager, definitions, statistics manager" />
|
||
|
<meta name="keywords" content="statistics manager, definitions, statistics manager" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="queryoptimize.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="statsmanager.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="rzajqstatsmgr" />
|
||
|
<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>Statistics Manager</title>
|
||
|
</head>
|
||
|
<body id="rzajqstatsmgr"><a name="rzajqstatsmgr"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Statistics Manager</h1>
|
||
|
<div><p>In releases before V5R2, the retrieval of statistics was a function
|
||
|
of the Optimizer. When the Optimizer needed to know information about a table,
|
||
|
it looked at the table description to retrieve the row count and table size.
|
||
|
If an index was available, the Optimizer might then extract further information
|
||
|
about the data in the table. In V5R2, the collection of statistics was removed
|
||
|
from the Optimizer and is now handled by a separate component called the Statistics
|
||
|
Manager.</p>
|
||
|
<p>The Statistics Manager does not actually run or optimize the query. It
|
||
|
controls the access to the metadata and other information that is required
|
||
|
to optimize the query. It uses this information to answer questions posed
|
||
|
by the query optimizer. The Statistics Manager always provides answers to
|
||
|
the optimizer. In cases where it cannot provide an answer based on actual
|
||
|
existing statistics information, it is designed to provide a predefined answer.</p>
|
||
|
<p>The Statistics Manager typically gathers and keeps track of the following
|
||
|
information:</p>
|
||
|
<dl><dt class="dlterm">Cardinality of values</dt>
|
||
|
<dd>The number of unique or distinct occurrences of a specific value in a
|
||
|
single column or multiple columns of a table.</dd>
|
||
|
<dt class="dlterm">Selectivity</dt>
|
||
|
<dd>Also known as a histogram, this information is an indication of how many
|
||
|
rows will be selected by any given selection predicate or combination of predicates.
|
||
|
Using sampling techniques, it describes the selectivity and distribution of
|
||
|
values in a given column of the table.</dd>
|
||
|
<dt class="dlterm">Frequent values</dt>
|
||
|
<dd>The top <em>nn</em> most frequent values of a column together with account
|
||
|
of how frequently each value occurs. This information is obtained by making
|
||
|
use of statistical sampling techniques. Built-in algorithms eliminate the
|
||
|
possibility of data skewing; for example, NULL values and default values that
|
||
|
can influence the statistical values are not taken into account.</dd>
|
||
|
<dt class="dlterm">Metadata information</dt>
|
||
|
<dd>This includes the total number of rows in the table, indexes that exist
|
||
|
over the table, and which indexes are useful for implementing the particular
|
||
|
query.</dd>
|
||
|
<dt class="dlterm">Estimate of IO operation</dt>
|
||
|
<dd>This is an estimate of the amount of IO operations that are required to
|
||
|
process the table or the identified index.</dd>
|
||
|
</dl>
|
||
|
<p>The Statistics Manager uses a hybrid approach to manage database statistics.
|
||
|
The majority of this information can be obtained from existing indexes. In
|
||
|
cases where the required statistics cannot be gathered from existing indexes,
|
||
|
statistical information is constructed of single columns of a table and stored
|
||
|
internally as part of the table. By default, this information is collected
|
||
|
automatically by the system, but you can manually control the collection of
|
||
|
statistics. Unlike indexes, however, statistics are not maintained immediately
|
||
|
as data in the tables change.</p>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="queryoptimize.htm" title="DB2 UDB for iSeries provides two query engines to process queries: the Classic Query Engine (CQE) and the SQL Query Engine (SQE).">Query Engine Overview</a></div>
|
||
|
</div>
|
||
|
<div class="relref"><strong>Related reference</strong><br />
|
||
|
<div><a href="statsmanager.htm" title="As stated earlier, the collection of statistics is handled by a separate component called the Statistics Manager. Statistical information can be used by the query optimizer to determine the best access plan for a query. Since the query optimizer bases its choice of access plan on the statistical information found in the table, it is important that this information be current.">Collecting statistics with the Statistics Manager</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|