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

111 lines
8.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="Effects of precompile options on database performance" />
<meta name="abstract" content="Several precompile options are available for creating SQL programs with improved performance. They are only options because using them may impact the function of the application. For this reason, the default value for these parameters is the value that will ensure successful migration of applications from prior releases. However, you can improve performance by specifying other options." />
<meta name="description" content="Several precompile options are available for creating SQL programs with improved performance. They are only options because using them may impact the function of the application. For this reason, the default value for these parameters is the value that will ensure successful migration of applications from prior releases. However, you can improve performance by specifying other options." />
<meta name="DC.subject" content="improving performance, using, precompile options, performance improvement, using precompile options, precompile options, improving performance, using, options, precompile, improving performance by using" />
<meta name="keywords" content="improving performance, using, precompile options, performance improvement, using precompile options, precompile options, improving performance, using, options, precompile, improving performance by using" />
<meta name="DC.Relation" scheme="URI" content="genconsid.htm" />
<meta name="DC.Relation" scheme="URI" content="ipuc.htm" />
<meta name="DC.Relation" scheme="URI" content="ipbc.htm" />
<meta name="DC.Relation" scheme="URI" content="retcurs.htm" />
<meta name="DC.Relation" scheme="URI" content="ipps.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="precompileopts" />
<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>Effects of precompile options on database performance</title>
</head>
<body id="precompileopts"><a name="precompileopts"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Effects of precompile options on database performance</h1>
<div><p>Several precompile options are available for creating SQL programs
with improved performance. They are only options because using them may impact
the function of the application. For this reason, the default value for these
parameters is the value that will ensure successful migration of applications
from prior releases. However, you can improve performance by specifying other
options.</p>
<div class="section"><p>The following table shows these precompile options and their performance
impacts.</p>
</div>
<div class="section"><p>Some of these options may be suitable for most of your applications.
Use the command <span class="cmdname">CRTDUPOBJ</span> to create a copy of the SQL <span class="cmdname">CRTSQLxxx</span>
command. and the <span class="cmdname">CHGCMDDFT</span> command to customize the optimal
values for the precompile parameters. The <span class="cmdname">DSPPGM</span>, <span class="cmdname">DSPSRVPGM</span>, <span class="cmdname">DSPMOD</span>,
or <span class="cmdname">PRTSQLINF</span> commands can be used to show the precompile
options that are used for an existing program object.</p>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="1" rules="all"><thead align="left"><tr><th align="left" valign="bottom" width="25%" id="d0e69">Precompile Option</th>
<th align="left" valign="bottom" width="25%" id="d0e71">Optimal Value</th>
<th align="left" valign="bottom" width="25%" id="d0e73">Improvements</th>
<th align="left" valign="bottom" width="25%" id="d0e75">Considerations</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="25%" headers="d0e69 ">ALWCPYDTA</td>
<td align="left" valign="top" width="25%" headers="d0e71 ">*OPTIMIZE (the default)</td>
<td align="left" valign="top" width="25%" headers="d0e73 ">Queries where the ordering or grouping criteria
conflicts with the selection criteria.</td>
<td align="left" valign="top" width="25%" headers="d0e75 ">A copy of the data may be made when the query
is opened.</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e69 ">ALWBLK</td>
<td align="left" valign="top" width="25%" headers="d0e71 ">*ALLREAD (the default)</td>
<td align="left" valign="top" width="25%" headers="d0e73 ">Additional read-only cursors use blocking.</td>
<td align="left" valign="top" width="25%" headers="d0e75 ">ROLLBACK HOLD may not change the position
of a read-only cursor. Dynamic processing of positioned updates or deletes
might fail.</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e69 ">CLOSQLCSR</td>
<td align="left" valign="top" width="25%" headers="d0e71 ">*ENDJOB, *ENDSQL, or *ENDACTGRP</td>
<td align="left" valign="top" width="25%" headers="d0e73 ">Cursor position can be retained across program
invocations.</td>
<td align="left" valign="top" width="25%" headers="d0e75 ">Implicit closing of SQL cursor is not done
when the program invocation ends.</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e69 ">DLYPRP</td>
<td align="left" valign="top" width="25%" headers="d0e71 ">*YES</td>
<td align="left" valign="top" width="25%" headers="d0e73 ">Programs using SQL PREPARE statements may
run faster.</td>
<td align="left" valign="top" width="25%" headers="d0e75 ">Complete validation of the prepared statement
is delayed until the statement is run or opened.</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e69 ">TGTRLS</td>
<td align="left" valign="top" width="25%" headers="d0e71 ">*CURRENT (the default)</td>
<td align="left" valign="top" width="25%" headers="d0e73 ">The precompiler can generate code that will
take advantage of performance enhancements available in the current release.</td>
<td align="left" valign="top" width="25%" headers="d0e75 ">The program object cannot be used on a server
from a previous release.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="genconsid.htm" title="As you code your applications, there are some general tips that can help you optimize performance.">General DB2 UDB for iSeries performance considerations</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="ipuc.htm" title="Some complex queries can perform better by using a sort or hashing method to evaluate the query instead of using or creating an index.">Effects of the ALWCPYDTA parameter on database performance</a></div>
<div><a href="ipbc.htm" title="To improve performance, the SQL runtime attempts to retrieve and insert rows from the database manager a block at a time whenever possible.">Control database manager blocking</a></div>
<div><a href="retcurs.htm" title="For non-ILE program calls, the close SQL cursor (CLOSQLCSR) parameter allows you to specify the scope of the following:">Retaining cursor positions for non-ILE program calls</a></div>
<div><a href="ipps.htm" title="The processing which occurs when an SQL PREPARE statement is run is similar to the processing which occurs during precompile processing.">Eliminate redundant validation with SQL PREPARE statements</a></div>
</div>
</div>
</body>
</html>