90 lines
6.4 KiB
HTML
90 lines
6.4 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="reference" />
|
|
<meta name="DC.Title" content="Query optimizer index advisor" />
|
|
<meta name="abstract" content="The query optimizer analyzes the row selection in the query and determines, based on default values, if creation of a permanent index improves performance. If the optimizer determines that a permanent index might be beneficial, it returns the key columns necessary to create the suggested index." />
|
|
<meta name="description" content="The query optimizer analyzes the row selection in the query and determines, based on default values, if creation of a permanent index improves performance. If the optimizer determines that a permanent index might be beneficial, it returns the key columns necessary to create the suggested index." />
|
|
<meta name="DC.subject" content="query optimizer index advisor, optimizer, query index advisor, index advisor, query optimizer, advisor, query optimizer index" />
|
|
<meta name="keywords" content="query optimizer index advisor, optimizer, query index advisor, index advisor, query optimizer, advisor, query optimizer index" />
|
|
<meta name="DC.Relation" scheme="URI" content="queryopt.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqshowindexes.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqadvise3020.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqovrve.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="t3020.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqmonstatements.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="idxadvisor" />
|
|
<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>Query optimizer index advisor</title>
|
|
</head>
|
|
<body id="idxadvisor"><a name="idxadvisor"><!-- --></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">Query optimizer index advisor</h1>
|
|
<div><p>The query optimizer analyzes the row selection in the query and
|
|
determines, based on default values, if creation of a permanent index improves
|
|
performance. If the optimizer determines that a permanent index might be beneficial,
|
|
it returns the key columns necessary to create the suggested index.</p>
|
|
<div class="section"><p>The optimizer is able to perform radix index probe over any combination
|
|
of the primary key columns, plus one additional secondary key column. Therefore
|
|
it is important that the first secondary key column be the most selective
|
|
secondary key column. The optimizer will use radix index scan with any of
|
|
the remaining secondary key columns. While radix index scan is not as fast
|
|
as radix index probe it can still reduce the number of keys selected. Hence,
|
|
secondary key columns that are fairly selective should be included.</p>
|
|
</div>
|
|
<div class="section"><p>It is up to the user to determine the true selectivity of any
|
|
secondary key columns and to determine whether those key columns should be
|
|
included when creating the index. When building the index the primary key
|
|
columns should be the left-most key columns followed by any of the secondary
|
|
key columns the user chooses and they should be prioritized by selectivity.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> After
|
|
creating the suggested index and executing the query again, it is possible
|
|
that the query optimizer will choose not to use the suggested index. The CQE
|
|
optimizer when suggesting indexes only considers the selection criteria and
|
|
does not include join, ordering, and grouping criteria. The SQE optimizer
|
|
includes selection, join, ordering, and grouping criteria when suggesting
|
|
indexes.</div>
|
|
</div>
|
|
<div class="section"><p>You can access index advisor information in many different ways.
|
|
These include:</p>
|
|
<ul><li>The index advisor interface in iSeries™ Navigator</li>
|
|
<li>SQL performance monitor Show statements</li>
|
|
<li>Visual Explain interface</li>
|
|
<li>Querying the Database monitor view 3020 - Index advised.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><img src="./delta.gif" alt="Start of change" /><strong><a href="rzajqshowindexes.htm">Display index advisor information</a></strong><img src="./deltaend.gif" alt="End of change" /><br />
|
|
You can display index advisor information from the optimizer using iSeries Navigator.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajqadvise3020.htm">Querying database monitor view 3020 - Index advised</a></strong><br />
|
|
The index advisor information can be found in the Database Monitor view 3020 - Index advised (SQE).</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="relref"><strong>Related reference</strong><br />
|
|
<div><a href="rzajqovrve.htm" title="You can use Visual Explain to view many types of information.">Overview of information available from Visual Explain</a></div>
|
|
<div><a href="t3020.htm">Database monitor view 3020 - Index advised (SQE)</a></div>
|
|
<div><a href="rzajqmonstatements.htm" title="You can view SQL statements that are included in a detailed monitor.">Viewing statements in a monitor</a></div>
|
|
</div>
|
|
</div>
|
|
<img src="./deltaend.gif" alt="End of change" /></body>
|
|
</html> |