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

92 lines
5.5 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="CPI4325 - Temporary result file built for query" />
<meta name="DC.Relation" scheme="URI" content="pimes.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="cpi4325" />
<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>CPI4325 - Temporary result file built for query</title>
</head>
<body id="cpi4325"><a name="cpi4325"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">CPI4325 - Temporary result file built for query</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="d0e16">CPI4325</th>
</tr>
</thead>
<tbody><tr valign="middle"><td valign="middle" width="26.02040816326531%" headers="d0e16 ">Message Text:</td>
<td valign="middle" width="73.9795918367347%" headers="d0e16 ">Temporary result file built for query.</td>
</tr>
<tr valign="middle"><td valign="middle" width="26.02040816326531%" headers="d0e16 ">Cause Text:</td>
<td valign="middle" width="73.9795918367347%" headers="d0e16 ">A temporary result file was created to contain the results of the query
for reason code &amp;4. This process took &amp;5 minutes and &amp;6 seconds.
The temporary file created contains &amp;7 records. The reason codes and their
meanings follow: <ol><li>The query contains grouping fields (GROUP BY) from more than one file,
or contains grouping fields from a secondary file of a join query that cannot
be reordered.</li>
<li>The query contains ordering fields (ORDER BY) from more than one file,
or contains ordering fields from a secondary file of a join query that cannot
be reordered.</li>
<li>The grouping and ordering fields are not compatible.</li>
<li>DISTINCT was specified for the query.</li>
<li>Set operator (UNION, EXCEPT, or INTERSECT) was specified for the query.</li>
<li>The query had to be implemented using a sort. Key length of more than
2000 bytes or more than 120 key fields specified for ordering.</li>
<li>The query optimizer chose to use a sort rather than an access path to
order the results of the query.</li>
<li>Perform specified record selection to minimize I/O wait time.</li>
<li>The query optimizer chose to use a hashing algorithm rather than an access
path to perform the grouping for the query.</li>
<li>The query contains a join condition that requires a temporary file.</li>
<li>The query optimizer creates a run-time temporary file in order to implement
certain correlated group by queries.</li>
<li>The query contains grouping fields (GROUP BY, MIN/MAX, COUNT, and so on)
and there is a read trigger on one or more of the underlying physical files
in the query.</li>
<li>The query involves a static cursor or the SQL FETCH FIRST clause.</li>
</ol>
</td>
</tr>
<tr valign="middle"><td valign="middle" width="26.02040816326531%" headers="d0e16 ">Recovery Text:</td>
<td valign="middle" width="73.9795918367347%" headers="d0e16 ">For more information about why a temporary result was used, refer to
the <a href="rzajqdta.htm#rzajqdta">Data access on DB2 UDB for iSeries: data access paths and methods</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section"><p>A temporary result table was created to contain the intermediate
results of the query. The results are stored in an internal temporary table
(structure). This allows for more flexibility by the optimizer in how to process
and store the results. The message help contains the reason why a temporary
result table is required.</p>
</div>
<div class="section"><p>In some cases, creating a temporary result table provides the
fastest way to run a query. Other queries that have many rows to be copied
into the temporary result table can take a significant amount of time. However,
if the query is taking more time and resources than can be allowed, consider
changing the query so that a temporary result table is not required.</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>
</body>
</html>