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

72 lines
5.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="concept" />
<meta name="DC.Title" content="Indexes and the optimizer" />
<meta name="abstract" content="Since the iSeries optimizer uses cost based optimization, the more information that the optimizer is given about the rows and columns in the database, the better able the optimizer is to create the best possible (least costly/fastest) access plan for the query. With the information from the indexes, the optimizer can make better choices about how to process the request (local selection, joins, grouping, and ordering)." />
<meta name="description" content="Since the iSeries optimizer uses cost based optimization, the more information that the optimizer is given about the rows and columns in the database, the better able the optimizer is to create the best possible (least costly/fastest) access plan for the query. With the information from the indexes, the optimizer can make better choices about how to process the request (local selection, joins, grouping, and ordering)." />
<meta name="DC.subject" content="index, and the optimizer" />
<meta name="keywords" content="index, and the optimizer" />
<meta name="DC.Relation" scheme="URI" content="efindex.htm" />
<meta name="DC.Relation" scheme="URI" content="avoidinstance.htm" />
<meta name="DC.Relation" scheme="URI" content="indexstats.htm" />
<meta name="DC.Relation" scheme="URI" content="rzajqmanageindexrebuild.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="rzajqindexopt" />
<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>Indexes and the optimizer</title>
</head>
<body id="rzajqindexopt"><a name="rzajqindexopt"><!-- --></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">Indexes and the optimizer</h1>
<div><p>Since the iSeries™ optimizer uses cost based optimization, the
more information that the optimizer is given about the rows and columns in
the database, the better able the optimizer is to create the best possible
(least costly/fastest) access plan for the query. With the information from
the indexes, the optimizer can make better choices about how to process the
request (local selection, joins, grouping, and ordering).</p>
<p>The CQE optimizer attempts to examine most, if not all, indexes built over
a table unless or until it times out. However, the SQE optimizer only considers
those indexes that are returned by the Statistics Manager. These include only
indexes that the Statistics Manager decides are useful in performing local
selection based on the "where" clause predicates. Consequently, the SQE optimizer
does not time out.</p>
<p>The primary goal of the optimizer is to choose an implementation that quickly
and efficiently eliminates the rows that are not interesting or required to
satisfy the request. Normally, query optimization is thought of as trying
to find the rows of interest. A proper indexing strategy will assist the optimizer
and database engine with this task.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="avoidinstance.htm">Instances where an index is not used</a></strong><br />
<span class="keyword">DB2 Universal Database™ for iSeries</span> does
not use indexes in the following instances:</li>
<li class="ulchildlink"><strong><a href="indexstats.htm">Determining unnecessary indexes</a></strong><br />
You can easily determine which indexes are being used for query optimization.</li>
<li class="ulchildlink"><img src="./delta.gif" alt="Start of change" /><strong><a href="rzajqmanageindexrebuild.htm">Manage index rebuilds</a></strong><img src="./deltaend.gif" alt="End of change" /><br />
You can manage the rebuild of your indexes using iSeries Navigator.
You can view a list of access paths that are rebuilding and either hold the
access path rebuild or change the priority of a rebuild.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="efindex.htm" title="DB2 Universal Database for iSeries provides two basic means for accessing tables: a table scan and an index-based retrieval. Index-based retrieval is typically more efficient than table scan when less than 20% of the table rows are selected.">Creating an index strategy</a></div>
</div>
</div>
<img src="./deltaend.gif" alt="End of change" /></body>
</html>