ibm-information-center/dist/eclipse/plugins/i5OS.ic.db2_5.4.0.1/rbafzsetdegree.htm

157 lines
8.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 xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="dc.language" scheme="rfc1766" 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. -->
<meta name="dc.date" scheme="iso8601" content="2005-09-19" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<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="keywords" content="SET CURRENT DEGREE statement, SET CURRENT DEGREE,
SQL statements" />
<title>SET CURRENT DEGREE</title>
<link rel="stylesheet" type="text/css" href="ibmidwb.css" />
<link rel="stylesheet" type="text/css" href="ic.css" />
</head>
<body>
<a id="Top_Of_Page" name="Top_Of_Page"></a><!-- Java sync-link -->
<script language = "Javascript" src = "../rzahg/synch.js" type="text/javascript"></script>
<a name="setdegree"></a>
<h2 id="setdegree"><a href="rbafzmst02.htm#ToC_1290">SET CURRENT DEGREE</a></h2><a id="idx3128" name="idx3128"></a><a id="idx3129" name="idx3129"></a>
<p>The SET CURRENT DEGREE statement assigns a value to the CURRENT DEGREE
special register.</p>
<a name="wq1743"></a>
<h3 id="wq1743"><a href="rbafzmst02.htm#ToC_1291">Invocation</a></h3>
<p>This statement can be embedded in an application program or
issued interactively. It is an executable statement that can be dynamically
prepared. It must not be specified in REXX.</p>
<a name="wq1744"></a>
<h3 id="wq1744"><a href="rbafzmst02.htm#ToC_1292">Authorization</a></h3>
<p>The privileges held by the authorization ID of the statement must include
the system authority of *JOBCTL.</p>
<a name="wq1745"></a>
<h3 id="wq1745"><a href="rbafzmst02.htm#ToC_1293">Syntax</a></h3>
<a href="rbafzsetdegree.htm#synsetdegree"><img src="c.gif" alt="Click to skip syntax diagram" /></a>
<pre class="cgraphic"><span><img src="c.gif" alt="Read syntax diagram" longdesc="rbafzmstsyn380.htm"
border="0" /></span><a href="#skipsyn-379"><img src="c.gif" alt="Skip visual syntax diagram"
border="0" /></a> .-=-.
>>-SET--CURRENT DEGREE--+---+--+-<span class="italic">string-constant</span>-+------------->&lt;
+-<span class="italic">variable</span>--------+
'-DEFAULT---------'
</pre>
<a name="skipsyn-379" id="skipsyn-379"></a>
<a name="synsetdegree"></a>
<h3 id="synsetdegree"><a href="rbafzmst02.htm#ToC_1294">Description</a></h3>
<p>The value of CURRENT DEGREE is replaced by the value of the
string constant or variable. The value must be a string with an actual length
that is not greater than 5 after trimming any leading and trailing blanks.
The value must be one of the following:</p>
<dl class="parml">
<dt class="bold">1</dt>
<dd>No parallel processing is allowed.
</dd>
<dt class="bold"><var class="pv">2 through 32767</var></dt>
<dd>Specifies the degree of parallelism that will be used.
</dd>
<dt class="bold">ANY</dt>
<dd>Specifies that the database manager can choose to use any number of tasks for either
I/O or SMP parallel processing.
<p>Use of parallel processing and the number
of tasks used is determined based on the number of processors available in
the system, this job's share of the amount of active memory available in the
pool in which the job is run, and whether the expected elapsed time for the
operation is limited by CPU processing or I/O resources. The database manager chooses
an implementation that minimizes elapsed time based on the job's share of
the memory in the pool.</p>
</dd>
<dt class="bold">NONE</dt>
<dd>No parallel processing is allowed.
</dd>
<dt class="bold">MAX</dt>
<dd>The database manager can choose to use any number of tasks for either I/O or SMP
parallel processing. MAX is similar to ANY except the database manager assumes that all
active memory in the pool can be used.
</dd>
<dt class="bold">IO</dt>
<dd>Any number of tasks can be used when the database manager chooses to use I/O parallel
processing for queries. SMP is not allowed.
</dd>
</dl>
<dl class="parml">
<dt class="bold"><var class="pv">variable</var></dt>
<dd>Specifies a variable that contains the value for the CURRENT DEGREE.
<p>The variable: </p>
<ul>
<li>Must be a CHAR, VARCHAR, UTF-16 or UCS-2 GRAPHIC, or UTF-16
or UCS-2 VARGRAPHIC variable. The actual length of the contents of the <var class="pv">variable</var> must not be greater than 5 after trimming any leading and trailing
blanks.</li>
<li>Must not be the null value.</li>
<li>All characters are case-sensitive and are not converted to uppercase characters.</li></ul>
</dd>
<dt class="bold"><var class="pv">string-constant</var></dt>
<dd>A character constant. The length of the constant must not exceed 5.
</dd>
<dt class="bold">DEFAULT</dt>
<dd>If the PARALLEL_DEGREE parameter in a current query options
file (QAQQINI) is specified, the CURRENT DEGREE will be reset to the PARALLEL_DEGREE.
Otherwise, the CURRENT DEGREE will be reset from the degree specified by the
QQRYDEGREE system value.
</dd>
</dl>
<a name="wq1746"></a>
<h3 id="wq1746"><a href="rbafzmst02.htm#ToC_1295">Notes</a></h3>
<p><span class="bold">Transaction considerations:</span> The SET CURRENT DEGREE
statement is not a commitable operation. ROLLBACK has no effect on CURRENT
DEGREE.</p>
<p><span class="bold">Initial current degree:</span> The initial value of CURRENT
DEGREE is equal to the parallelism degree in effect from the CHGQRYA CL command,
PARALLEL_DEGREE parameter in the current query options file (QAQQINI), or
the QQRYDEGREE system value.</p>
<p><span class="bold">Parallelism degree precedence:</span> The parallelism degree
can be controlled in several ways. The actual parallelism degree used is determined
as follows:</p>
<ul>
<li>If a SET CURRENT DEGREE statement or a CHGQRYA CL command with a DEGREE
keyword has been executed, the parallelism degree specified by the most recent
of either is the value of CURRENT DEGREE.</li>
<li>If neither a SET CURRENT DEGREE statement nor a CHGQRYA CL command with
a DEGREE keyword has been executed,
<ul>
<li>If a current query options file (QAQQINI) with a PARALLEL_DEGREE parameter
has been specified, the parallelism degree specified by the QAQQINI file is
the value of CURRENT DEGREE.</li>
<li>Otherwise, the parallelism degree specified by the QQRYDEGREE system value
is the value of CURRENT DEGREE.</li></ul></li></ul><p class="indatacontent">For more information, see <a href="../rzajq/rzajqkickoff.htm">Database Performance and
Query Optimization</a>.</p>
<p><span class="bold">Current degree scope:</span> The scope of CURRENT DEGREE
is the job.</p>
<p><span class="bold">Parallel limitations:</span> If the DB2&reg; UDB Symmetric
Multiprocessing feature is not installed, a warning is returned and parallelism
is not used.</p>
<p>Some SQL statements cannot use parallelism.</p>
<a name="wq1747"></a>
<h3 id="wq1747"><a href="rbafzmst02.htm#ToC_1296">Example</a></h3>
<p><span class="italic">Example 1:</span> The following statement sets the CURRENT
DEGREE to inhibit parallelism.</p>
<pre class="xmp"> <span class="bold">SET CURRENT DEGREE =</span> '1' </pre>
<p><span class="italic">Example 2:</span> The following statement sets the CURRENT
DEGREE to allow parallelism.</p>
<pre class="xmp"> <span class="bold">SET CURRENT DEGREE =</span> 'ANY' </pre>
<hr /><br />
[ <a href="#Top_Of_Page">Top of Page</a> | <a href="rbafzmstsetdebug.htm">Previous Page</a> | <a href="rbafzsetdescr.htm">Next Page</a> | <a href="rbafzmst02.htm#wq1">Contents</a> |
<a href="rbafzmstindex.htm#index">Index</a> ]
<a id="Bot_Of_Page" name="Bot_Of_Page"></a>
</body>
</html>