ibm-information-center/dist/eclipse/plugins/i5OS.ic.ddp_5.4.0.1/rbal1ques2.htm

91 lines
4.9 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="When will query data be blocked for better performance?" />
<meta name="abstract" content="The query data will be blocked if none of these conditions are true." />
<meta name="description" content="The query data will be blocked if none of these conditions are true." />
<meta name="DC.subject" content="query data, blocked for better performance, data, performance, blocked query data" />
<meta name="keywords" content="query data, blocked for better performance, data, performance, blocked query data" />
<meta name="DC.Relation" scheme="URI" content="rbal1xplat.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="rbal1ques2" />
<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>When will query data be blocked for better performance?</title>
</head>
<body id="rbal1ques2"><a name="rbal1ques2"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">When will query data be blocked for better performance?</h1>
<div><p>The query data will be blocked if none of these conditions are
true.</p>
<div class="section"><ul><li>The cursor is updatable (see note 1).</li>
<li>The cursor is potentially updatable (see note 2).</li>
<li>The BLOCKING NO precompiler or bind option was used on SQLPREP or SQLBIND.</li>
</ul>
</div>
<div class="section"><p>Unless you force single-row protocol with the BLOCKING NO precompile/bind
option, blocking will occur in both of the following cases:</p>
<ul><li>The cursor is read-only (see note 3).</li>
<li>All of the following are true: <ul><li>There is no FOR UPDATE OF clause in the SELECT, and</li>
<li>There are no UPDATE or DELETE WHERE CURRENT OF statements against the
cursor in the program, and</li>
<li>Either the program does not contain dynamic SQL statements or BLOCKING
ALL was used.</li>
</ul>
</li>
</ul>
</div>
<div class="section"> <div class="note"><span class="notetitle">Notes:</span> <ol><li>A cursor is updatable if it is not read-only (see note 3), and one of
the following items is true: <ul><li>The select statement contained the FOR UPDATE OF clause, or</li>
<li>There exists in the program an UPDATE or DELETE WHERE CURRENT OF against
the cursor.</li>
</ul>
</li>
<li>A cursor is potentially updatable if it is not read-only (see note 3),
and if the program includes any dynamic statement, and the BLOCKING UNAMBIG
precompile or bind option was used on SQLPREP or SQLBIND.</li>
<li>A cursor is read-only if one or more of the following conditions is true:
<ul><li>The DECLARE CURSOR statement specified an ORDER BY clause but did not
specify a FOR UPDATE OF clause.</li>
<li>The DECLARE CURSOR statement specified a FOR FETCH ONLY clause.</li>
<li>One or more of the following conditions are true for the cursor or a view
or logical file referenced in the outer subselect to which the cursor refers:
<ul><li>The outer subselect contains a DISTINCT keyword, GROUP BY clause, HAVING
clause, or a column function in the outer subselect.</li>
<li>The select contains a join function.</li>
<li>The select contains a UNION operator.</li>
<li>The select contains a subquery that refers to the same table as the table
of the outer-most subselect.</li>
<li>The select contains a complex logical file that had to be copied to a
temporary file.</li>
<li>All of the selected columns are expressions, scalar functions, or constants.</li>
<li>All of the columns of a referenced logical file are input only.</li>
</ul>
</li>
</ul>
</li>
</ol>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal1xplat.htm" title="This topic collection concentrates on describing iSeries support for distributed relational databases in a network of iSeries servers (a like environment).">User FAQs</a></div>
</div>
</div>
</body>
</html>