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

120 lines
6.8 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="CPI432A - Query optimizer timed out for file &amp;1" />
<meta name="DC.Relation" scheme="URI" content="pimes.htm" />
<meta name="DC.Relation" scheme="URI" content="cpi432d.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="cpi432a" />
<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>CPI432A - Query optimizer timed out for file &amp;1</title>
</head>
<body id="cpi432a"><a name="cpi432a"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">CPI432A - Query optimizer timed out for file &amp;1</h1>
<div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th colspan="2" align="center" valign="middle" id="d0e19">CPI432A</th>
</tr>
</thead>
<tbody><tr valign="middle"><td valign="middle" width="26.02040816326531%" headers="d0e19 ">Message Text:</td>
<td valign="middle" width="73.9795918367347%" headers="d0e19 ">Query optimizer timed out for file &amp;1.</td>
</tr>
<tr valign="middle"><td valign="middle" width="26.02040816326531%" headers="d0e19 ">Cause Text:</td>
<td valign="middle" width="73.9795918367347%" headers="d0e19 ">The query optimizer timed out before it could consider all access paths
built over member &amp;3 of file &amp;1 in library &amp;2. <p></p>
The list
below shows the access paths considered before the optimizer timed out. If
file &amp;1 in library &amp;2 is a logical file then the access paths specified
are actually built over member &amp;9 of physical file &amp;7 in library &amp;8.
<p></p>
Following each access path name in the list is a reason code
which explains why the access path was not used. A reason code of 0 indicates
that the access path was used to implement the query. <p></p>
The
reason codes and their meanings follow: <ol><li>Access path was not in a valid state. The system invalidated the access
path.</li>
<li>Access path was not in a valid state. The user requested that the access
path be rebuilt.</li>
<li>Access path is a temporary access path (resides in library QTEMP) and
was not specified as the file to be queried.</li>
<li>The cost to use this access path, as determined by the optimizer, was
higher than the cost associated with the chosen access method.</li>
<li>The keys of the access path did not match the fields specified for the
ordering/grouping criteria.</li>
<li>The keys of the access path did not match the fields specified for the
join criteria.</li>
<li>Use of this access path would not minimize delays when reading records
from the file as the user requested.</li>
<li>The access path cannot be used for a secondary file of the join query
because it contains static select/omit selection criteria. The join-type of
the query does not allow the use of select/omit access paths for secondary
files.</li>
<li>File &amp;1 contains record ID selection. The join-type of the query forces
a temporary access path to be built to process the record ID selection.</li>
<li> and greater - View the second level message text of the next message
issued (CPI432D) for an explanation of these reason codes.</li>
</ol>
</td>
</tr>
<tr valign="middle"><td valign="middle" width="26.02040816326531%" headers="d0e19 ">Recovery Text:</td>
<td valign="middle" width="73.9795918367347%" headers="d0e19 ">To ensure an access path is considered for optimization specify that
access path to be the queried file. The optimizer will first consider the
access path of the file specified on the query. SQL-created indexes cannot
be queried but can be deleted and recreated to increase the chance they will
be considered during query optimization. <p></p>
The user may want to delete
any access paths no longer needed.</td>
</tr>
</tbody>
</table>
</div>
<div class="section"><p>The optimizer stops considering indexes when the time spent optimizing
the query exceeds an internal value that corresponds to the estimated time
to run the query and the number of rows in the queried tables. Generally,
the more rows in the tables, the greater the number of indexes that will be
considered.</p>
</div>
<div class="section"><p>When the estimated time to run the query is exceeded, the optimizer
does not consider any more indexes and uses the current best method to implement
the query. Either an index has been found to get the best performance, or
an index will have to be created. If the actual time to execute the query
exceeds the estimated run time this may indicate the optimizer did not consider
the best index.</p>
</div>
<div class="section"><p>The message help contains a list of indexes that were considered
before the optimizer timed out. By viewing this list of indexes, you may be
able to determine if the optimizer timed out before the best index was considered.</p>
</div>
<div class="section"><p>To ensure that an index is considered for optimization, specify
the logical file associated with the index as the table to be queried. The
optimizer will consider the index of the table specified on the query or SQL
statement first. Remember that SQL indexes cannot be queried.</p>
</div>
<div class="section"><p>You may want to delete any indexes that are no longer needed.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="pimes.htm" title="You can evaluate the structure and performance of the given SQL statements in a program using informational messages put in the job log by the database manager.">Query optimization performance information messages</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="cpi432d.htm">CPI432D - Additional access path reason codes were used</a></div>
</div>
</div>
</body>
</html>