ibm-information-center/dist/eclipse/plugins/i5OS.ic.sqlp_5.4.0.1/rbafyudfperf.htm

58 lines
4.3 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="Improve performance of procedures and functions" />
<meta name="abstract" content="When creating stored procedures and user-defined functions (UDFs), the SQL procedural language processor on the iSeries does not always generate the most efficient code. However, you can do some changes to reduce the number of database engine calls needed and improve performance." />
<meta name="description" content="When creating stored procedures and user-defined functions (UDFs), the SQL procedural language processor on the iSeries does not always generate the most efficient code. However, you can do some changes to reduce the number of database engine calls needed and improve performance." />
<meta name="DC.Relation" scheme="URI" content="rbafyroutines.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafyimplement.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafyredesign.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="rbafyudfperf" />
<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>Improve performance of procedures and functions</title>
</head>
<body id="rbafyudfperf"><a name="rbafyudfperf"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Improve performance of procedures and functions</h1>
<div><p>When creating stored procedures and user-defined functions (UDFs),
the SQL procedural language processor on the iSeries™ does not always generate the
most efficient code. However, you can do some changes to reduce the number
of database engine calls needed and improve performance. </p>
<div class="section"><p>Some changes are in the design of a routine and some are in the
implementation. For example, differences between how the C language
compiler handles host variables and the way the SQL procedural processor requires
the host variables to be handled can cause many calls to the database engine.
These calls are very expensive and, when done many times, can significantly
degrade performance.</p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbafyimplement.htm">Improve implementation of procedures and functions</a></strong><br />
These recommendations can be seen as simple coding techniques that can help reduce the processing time of a function or procedure. These tips are especially important to follow in functions, as a function will tend to be called multiple times from many different procedures.</li>
<li class="ulchildlink"><strong><a href="rbafyredesign.htm">Redesign routines for performance</a></strong><br />
Even following all of the implementation tips, sometimes a procedure or function may still not perform as well as it needs to. In that case, you need to look at the design of the procedure or UDF and see if there are any changes that can be made to improve the performance.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafyroutines.htm" title="Routines are pieces of code or programs that you can call to perform operations.">Routines</a></div>
</div>
</div>
</body>
</html>