64 lines
4.4 KiB
HTML
64 lines
4.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="Improve SQL blocking performance when using FETCH FOR n ROWS" />
|
|
<meta name="abstract" content="Special performance considerations should be made for the following points when using FETCH FOR n ROWS." />
|
|
<meta name="description" content="Special performance considerations should be made for the following points when using FETCH FOR n ROWS." />
|
|
<meta name="DC.subject" content="improving performance, SQL blocking, performance improvement, blocking, SQL, command (CL), Override Database File (OVRDBF), OVRDBF (Override Database File), Override Database File (OVRDBF) command" />
|
|
<meta name="keywords" content="improving performance, SQL blocking, performance improvement, blocking, SQL, command (CL), Override Database File (OVRDBF), OVRDBF (Override Database File), Override Database File (OVRDBF) command" />
|
|
<meta name="DC.Relation" scheme="URI" content="fetchnrows.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="improvesqlblock" />
|
|
<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 SQL blocking performance when using FETCH FOR n ROWS</title>
|
|
</head>
|
|
<body id="improvesqlblock"><a name="improvesqlblock"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Improve SQL blocking performance when using FETCH FOR n ROWS</h1>
|
|
<div><p>Special performance considerations should be made for the following
|
|
points when using FETCH FOR n ROWS.</p>
|
|
<div class="section"><div class="p">You can improve SQL blocking performance with the following: <ul><li>The attribute information in the host structure array or the descriptor
|
|
associated with the row storage area should match the attributes of the columns
|
|
retrieved.</li>
|
|
<li>The application should retrieve as many rows as possible with a single
|
|
multiple-row FETCH call. The blocking factor for a multiple-row FETCH request
|
|
is not controlled by the system page sizes or the SEQONLY parameter on the
|
|
OVRDBF command. It is controlled by the number of rows that are requested
|
|
on the multiple-row FETCH request.</li>
|
|
<li>Single- and multiple-row FETCH requests against the same cursor should
|
|
not be mixed within a program. If one FETCH against a cursor is treated as
|
|
a multiple-row FETCH, all fetches against that cursor are treated as multiple-row
|
|
fetches. In that case, each of the single-row FETCH requests is treated as
|
|
a multiple-row FETCH of one row.</li>
|
|
<li>The PRIOR, CURRENT, and RELATIVE scroll options should not be used with
|
|
multiple-row FETCH statements. To allow random movement of the cursor by
|
|
the application, the database manager must maintain the same cursor position
|
|
as the application. Therefore, the SQL run-time treats all FETCH requests
|
|
against a scrollable cursor with these options specified as multiple-row FETCH
|
|
requests.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="fetchnrows.htm" title="Applications that perform many FETCH statements in succession may be improved by using FETCH FOR n ROWS. With this clause, you can retrieve multiple rows of data from a table and put them into a host structure array or row storage area with a single FETCH.">Use FETCH FOR n ROWS</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |