137 lines
9.4 KiB
HTML
137 lines
9.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="Controlling job level parallel processing for queries" />
|
|
<meta name="abstract" content="You can also control query parallel processing at the job level using the DEGREE parameter of the Change Query Attributes (CHGQRYA) command or in the QAQQINI file, or using the SET_CURRENT_DEGREE SQL statement." />
|
|
<meta name="description" content="You can also control query parallel processing at the job level using the DEGREE parameter of the Change Query Attributes (CHGQRYA) command or in the QAQQINI file, or using the SET_CURRENT_DEGREE SQL statement." />
|
|
<meta name="DC.subject" content="parallel processing, controlling, in jobs (, CHGQRYA" />
|
|
<meta name="keywords" content="parallel processing, controlling, in jobs (, CHGQRYA" />
|
|
<meta name="DC.Relation" scheme="URI" content="smp0001.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzsetdegree.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../cl/chgqrya.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="joblevelpar" />
|
|
<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>Controlling job level parallel processing for queries</title>
|
|
</head>
|
|
<body id="joblevelpar"><a name="joblevelpar"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Controlling job level parallel processing for queries</h1>
|
|
<div><p>You can also control query parallel processing at the job level
|
|
using the DEGREE parameter of the <span class="cmdname">Change Query Attributes (CHGQRYA)</span> command
|
|
or in the QAQQINI file, or using the SET_CURRENT_DEGREE SQL statement. </p>
|
|
<div class="section"><h4 class="sectiontitle">Using the Change Query Attributes (CHGQRYA) command</h4><p>The
|
|
parallel processing option allowed and, optionally, the number of tasks that
|
|
can be used when running database queries in the job can be specified. You
|
|
can prompt on the <span class="cmdname">Change Query Attributes (CHGQRYA)</span> command
|
|
in an interactive job to display the current values of the DEGREE query attribute.</p>
|
|
<p>Changing
|
|
the DEGREE query attribute does not affect queries that have already been
|
|
started or queries using reusable ODPs.</p>
|
|
</div>
|
|
<div class="section"><p id="joblevelpar__paravalues"><a name="joblevelpar__paravalues"><!-- --></a>The parameter values for the DEGREE keyword are:
|
|
</p>
|
|
<dl><dt class="dlterm"><span class="synph"><span class="defkwd">*SAME</span></span></dt>
|
|
<dd>The parallel degree query attribute does not change.</dd>
|
|
<dt class="dlterm"><span class="synph"><span class="kwd">*NONE</span></span></dt>
|
|
<dd>No parallel processing is allowed for database query processing.</dd>
|
|
<dt class="dlterm"><span class="synph"><span class="kwd">*IO</span></span></dt>
|
|
<dd>Any number of tasks can be used when the database query optimizer chooses
|
|
to use I/O parallel processing for queries. SMP parallel processing is not
|
|
allowed.</dd>
|
|
<dt class="dlterm"><span class="synph"><span class="kwd">*OPTIMIZE</span></span></dt>
|
|
<dd>The query optimizer can choose to use any number of tasks for either I/O
|
|
or SMP parallel processing to process the query. SMP parallel processing
|
|
can be used only if the <span class="keyword">DB2<sup>®</sup> UDB Symmetric Multiprocessing</span> feature
|
|
is installed. Use of parallel processing and the number of tasks used is determined
|
|
with respect to the number of processors available in the server, the 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 query is limited by
|
|
CPU processing or I/O resources. The query optimizer chooses an implementation
|
|
that minimizes elapsed time based on the job's share of the memory in the
|
|
pool.</dd>
|
|
<dt class="dlterm"><span class="synph"><span class="kwd">*MAX</span></span></dt>
|
|
<dd>The query optimizer can choose to use either I/O or SMP parallel processing
|
|
to process the query. SMP parallel processing can be used only if the <span class="keyword">DB2 UDB Symmetric Multiprocessing</span> feature is installed. The
|
|
choices made by the query optimizer are similar to those made for parameter
|
|
value *OPTIMIZE except the optimizer assumes that all active memory in the
|
|
pool can be used to process the query.</dd>
|
|
<dt class="dlterm"><span class="synph"><span class="kwd">*NBRTASKS</span></span> <span class="synph"><span class="var">number-of-tasks</span></span></dt>
|
|
<dd>Specifies the number of tasks to be used when the query optimizer chooses
|
|
to use SMP parallel processing to process a query. I/O parallelism is also
|
|
allowed. SMP parallel processing can be used only if the <span class="keyword">DB2 UDB Symmetric Multiprocessing</span> feature
|
|
is installed. <p>Using a number of tasks less than the number of processors
|
|
available on the server restricts the number of processors used simultaneously
|
|
for running a given query. A larger number of tasks ensures that the query
|
|
is allowed to use all of the processors available on the server to run the
|
|
query. Too many tasks can degrade performance because of the over commitment
|
|
of active memory and the overhead cost of managing all of the tasks.</p>
|
|
</dd>
|
|
<dt class="dlterm"><span class="synph"><span class="kwd">*SYSVAL</span></span></dt>
|
|
<dd>Specifies that the processing option used should be set to the current
|
|
value of the QQRYDEGREE system value.</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="section"><p>The initial value of the DEGREE attribute for a job is *SYSVAL.</p>
|
|
</div>
|
|
<div class="section"><img src="./delta.gif" alt="Start of change" /><h4 class="sectiontitle">Using the SET CURRENT DEGREE SQL statement</h4><p>You
|
|
can use the SET CURRENT DEGREE SQL statement to change the value of the CURRENT_DEGREE
|
|
special register. The possible values for the CURRENT_DEGREE special register
|
|
are:</p>
|
|
<dl><dt class="dlterm"><span class="synph"><span class="kwd">1</span></span></dt>
|
|
<dd>No parallel processing is allowed.</dd>
|
|
<dt class="dlterm"><span class="synph"><span class="kwd">2 through 32767</span></span></dt>
|
|
<dd>Specifies the degree of parallelism that will be used.</dd>
|
|
<dt class="dlterm"><span class="synph"><span class="kwd">ANY</span></span></dt>
|
|
<dd>Specifies that the database manager can choose to use any number of tasks
|
|
for either I/O or SMP parallel processing. 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.</dd>
|
|
<dt class="dlterm"><span class="synph"><span class="kwd">NONE</span></span></dt>
|
|
<dd>No parallel processing is allowed.</dd>
|
|
<dt class="dlterm"><span class="synph"><span class="kwd">MAX</span></span></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="dlterm"><span class="synph"><span class="kwd">IO</span></span></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>
|
|
<p>The value can be changed by invoking the SET CURRENT
|
|
DEGREE statement. </p>
|
|
<p>The initial value of CURRENT DEGREE is determined
|
|
by the current degree in effect from the CHGQRYA CL command, PARALLEL_DEGREE
|
|
parameter in the current query options file (QAQQINI), or the QQRYDEGREE system
|
|
value.</p>
|
|
<img src="./deltaend.gif" alt="End of change" /></div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="smp0001.htm" title="There are two types of parallel processing available. The first is a parallel I/O that is available at no charge. The second is DB2 UDB Symmetric Multiprocessing, a feature that you can purchase. You can turn parallel processing on and off.">Control parallel processing for queries</a></div>
|
|
</div>
|
|
<div class="relinfo"><strong>Related information</strong><br />
|
|
<div><a href="../db2/rbafzsetdegree.htm">Set Current Degree statement</a></div>
|
|
<div><a href="../cl/chgqrya.htm">Change Query Attributes (CHGQRYA) command</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |