119 lines
7.1 KiB
HTML
119 lines
7.1 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="Table probe" />
|
|
<meta name="abstract" content="A table probe operation is used to retrieve a specific row from a table based upon its row number. The row number is provided to the table probe access method by some other operation that generates a row number for the table." />
|
|
<meta name="description" content="A table probe operation is used to retrieve a specific row from a table based upon its row number. The row number is provided to the table probe access method by some other operation that generates a row number for the table." />
|
|
<meta name="DC.subject" content="definitions, table probe, access method, table probe" />
|
|
<meta name="keywords" content="definitions, table probe, access method, table probe" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqcrttbl.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="rzajqtblprobe" />
|
|
<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>Table probe</title>
|
|
</head>
|
|
<body id="rzajqtblprobe"><a name="rzajqtblprobe"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Table probe</h1>
|
|
<div><p>A table probe operation is used to retrieve a specific row from
|
|
a table based upon its row number. The row number is provided to the table
|
|
probe access method by some other operation that generates a row number for
|
|
the table.</p>
|
|
<div class="section"><p>This can include index operations as well as temporary row number
|
|
lists or bitmaps. The processing for a table probe is typically random; it
|
|
requests a small I/O to only retrieve the row in question and does not attempt
|
|
to bring in any extraneous rows. This leads to very efficient processing for
|
|
smaller result sets because only the rows needed to satisfy the query are
|
|
processed rather than the scan method which must process all of the rows.
|
|
However, since the sequence of the row numbers are not known in advance, very
|
|
little pre-fetching can be performed to bring the data into main memory. This
|
|
can result in most of the I/Os associated with this access method to be performed
|
|
synchronously.</p>
|
|
</div>
|
|
<div class="section">
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption>Table 1. Table probe attributes</caption><thead align="left"><tr><th valign="top" width="31.155778894472363%" id="d0e37">Data access method</th>
|
|
<th valign="top" width="68.84422110552764%" id="d0e39">Table probe</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="31.155778894472363%" headers="d0e37 "><strong>Description</strong></td>
|
|
<td valign="top" width="68.84422110552764%" headers="d0e39 "> Reads a single row from the table based upon a specific
|
|
row number. A random I/O is performed against the table to extract the row.</td>
|
|
</tr>
|
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e37 "><strong>Advantages</strong></td>
|
|
<td valign="top" width="68.84422110552764%" headers="d0e39 "><ul><li>Requests smaller I/Os to prevent paging rows into memory that are not
|
|
needed</li>
|
|
<li>Can be used in conjunction with any access method that generates a row
|
|
number for the table probe to process</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e37 "><strong>Considerations</strong></td>
|
|
<td valign="top" width="68.84422110552764%" headers="d0e39 ">Because of the synchronous random I/O the probe can
|
|
perform poorly when a large number of rows are selected </td>
|
|
</tr>
|
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e37 "><strong>Likely to be used</strong></td>
|
|
<td valign="top" width="68.84422110552764%" headers="d0e39 "><ul><li>When row numbers (either from indexes or temporary row number lists) are
|
|
being used, but data from the underlying table rows are required for further
|
|
processing of the query</li>
|
|
<li>When processing any remaining selection or projection of the values</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e37 "><strong>Example SQL statement</strong></td>
|
|
<td valign="top" width="68.84422110552764%" headers="d0e39 "><pre> CREATE INDEX X1 ON Employee (LastName)
|
|
|
|
SELECT * FROM Employee
|
|
WHERE WorkDept BETWEEN 'A01' AND 'E01'
|
|
AND LastName IN ('Smith', 'Jones', 'Peterson')
|
|
OPTIMIZE FOR ALL ROWS</pre>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e37 "><strong>Messages indicating use</strong></td>
|
|
<td valign="top" width="68.84422110552764%" headers="d0e39 ">There is no specific message that indicates the use
|
|
of a table probe. The messages in this example illustrate the use of a data
|
|
access method that generates a row number that is used to perform the table
|
|
probe operation. <ul><li>Optimizer Debug: <pre>CPI4328 — Access path of file X1 was used by query</pre>
|
|
</li>
|
|
<li>PRTSQLINF: <pre>SQL4008 — Index X1 used for table 1.</pre>
|
|
<pre>SQL4011 — Index scan-key row positioning (probe)
|
|
used on table 1.</pre>
|
|
</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e37 "><strong>SMP parallel enabled</strong></td>
|
|
<td valign="top" width="68.84422110552764%" headers="d0e39 ">Yes</td>
|
|
</tr>
|
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e37 "><strong>Also referred to as</strong></td>
|
|
<td valign="top" width="68.84422110552764%" headers="d0e39 ">Table Probe, Preload</td>
|
|
</tr>
|
|
<tr><td valign="top" width="31.155778894472363%" headers="d0e37 "><strong>Visual Explain icon</strong></td>
|
|
<td valign="top" width="68.84422110552764%" headers="d0e39 "><br /><img src="rzajq505.gif" alt="Table probe icon" /><br /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajqcrttbl.htm" title="An SQL table or physical file is the base object for a query. It represents the source of the data used to produce the result set for the query. It is created by the user and specified in the FROM clause (or OPNQRYF FILE parameter).">Table</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |