138 lines
8.1 KiB
HTML
138 lines
8.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="Encoded vector index probe" />
|
||
<meta name="abstract" content="The encoded vector index (EVI) is quickly probed based upon the selection criteria that were rewritten into a series of ranges. It produces either a temporary row number list or bitmap." />
|
||
<meta name="description" content="The encoded vector index (EVI) is quickly probed based upon the selection criteria that were rewritten into a series of ranges. It produces either a temporary row number list or bitmap." />
|
||
<meta name="DC.subject" content="definitions, encoded vector index probe access method, index, encoded vector index probe access method, encoded vector index probe, access method, encoded vector index probe" />
|
||
<meta name="keywords" content="definitions, encoded vector index probe access method, index, encoded vector index probe access method, encoded vector index probe, access method, encoded vector index probe" />
|
||
<meta name="DC.Relation" scheme="URI" content="perf21c.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="rzajqeviprobe" />
|
||
<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>Encoded vector index probe</title>
|
||
</head>
|
||
<body id="rzajqeviprobe"><a name="rzajqeviprobe"><!-- --></a>
|
||
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
<h1 class="topictitle1">Encoded vector index probe</h1>
|
||
<div><p>The encoded vector index (EVI) is quickly probed based upon the
|
||
selection criteria that were rewritten into a series of ranges. It produces
|
||
either a temporary row number list or bitmap.</p>
|
||
<div class="section">
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption>Table 1. Encoded vector index probe attributes</caption><thead align="left"><tr><th valign="top" width="30.76923076923077%" id="d0e38">Data access method</th>
|
||
<th valign="top" width="69.23076923076923%" id="d0e40">Encoded vector index probe</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr><td valign="top" width="30.76923076923077%" headers="d0e38 "><strong>Description</strong></td>
|
||
<td valign="top" width="69.23076923076923%" headers="d0e40 ">The encoded vector index (EVI) is quickly probed based
|
||
upon the selection criteria that were rewritten into a series of ranges. It
|
||
produces either a temporary row number list or bitmap. </td>
|
||
</tr>
|
||
<tr><td valign="top" width="30.76923076923077%" headers="d0e38 "><strong>Advantages</strong></td>
|
||
<td valign="top" width="69.23076923076923%" headers="d0e40 "><ul><li>Only those index entries that match any selection continue to be processed </li>
|
||
<li>Provides very quick access to the selected rows </li>
|
||
<li>Returns the row numbers in ascending sequence so that the Table Probe
|
||
can be more aggressive in pre-fetching the rows for its operation</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr><td valign="top" width="30.76923076923077%" headers="d0e38 "><strong>Considerations</strong></td>
|
||
<td valign="top" width="69.23076923076923%" headers="d0e40 ">EVIs are generally built over a single key. The more
|
||
distinct the column is and the higher the overflow percentage, the less advantageous
|
||
the encoded vector index becomes. EVIs always require a Table Probe to be
|
||
performed on the result of the EVI probe operation.</td>
|
||
</tr>
|
||
<tr><td valign="top" width="30.76923076923077%" headers="d0e38 "><strong>Likely to be used</strong></td>
|
||
<td valign="top" width="69.23076923076923%" headers="d0e40 "><ul><li>When the selection columns match the leading key columns of the index </li>
|
||
<li>When an encoded vector index exists and savings in reduced I/O against
|
||
the table justifies the extra cost of probing the EVI and fully populating
|
||
the temporary row number list. </li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr><td valign="top" width="30.76923076923077%" headers="d0e38 "><strong>Example SQL statement</strong></td>
|
||
<td valign="top" width="69.23076923076923%" headers="d0e40 "><pre>CREATE ENCODED VECTOR INDEX EVI1 ON
|
||
Employee (WorkDept)
|
||
CREATE ENCODED VECTOR INDEX EVI2 ON
|
||
Employee (Salary)
|
||
CREATE ENCODED VECTOR INDEX EVI3 ON
|
||
Employee (Job)
|
||
|
||
SELECT *
|
||
FROM Employee
|
||
WHERE WorkDept = 'E01' AND Job = 'CLERK'
|
||
AND Salary = 5000
|
||
OPTIMIZE FOR 99999 ROWS</pre>
|
||
</td>
|
||
</tr>
|
||
<tr><td valign="top" width="30.76923076923077%" headers="d0e38 "><strong>Messages indicating use</strong></td>
|
||
<td valign="top" width="69.23076923076923%" headers="d0e40 "><ul><li>Optimizer Debug: <pre>CPI4329 -- Arrival sequence was used for file
|
||
EMPLOYEE.
|
||
CPI4338 -– 3 Access path(s) used for bitmap
|
||
processing of file EMPLOYEE. </pre>
|
||
</li>
|
||
<li>PRTSQLINF: <pre>SQL4010 -- Table scan access for table 1.
|
||
SQL4032 -- Index EVI1 used for bitmap processing
|
||
of table 1.
|
||
SQL4032 -- Index EVI2 used for bitmap processing
|
||
of table 1.
|
||
SQL4032 -- Index EVI3 used for bitmap processing
|
||
of table 1. </pre>
|
||
</li>
|
||
</ul>
|
||
</td>
|
||
</tr>
|
||
<tr><td valign="top" width="30.76923076923077%" headers="d0e38 "><strong>SMP parallel enabled</strong></td>
|
||
<td valign="top" width="69.23076923076923%" headers="d0e40 ">Yes</td>
|
||
</tr>
|
||
<tr><td valign="top" width="30.76923076923077%" headers="d0e38 "><strong>Also referred to as</strong></td>
|
||
<td valign="top" width="69.23076923076923%" headers="d0e40 "> Encoded Vector Index Probe, Preload</td>
|
||
</tr>
|
||
<tr><td valign="top" width="30.76923076923077%" headers="d0e38 "><strong>Visual Explain icon</strong></td>
|
||
<td valign="top" width="69.23076923076923%" headers="d0e40 "><br /><img src="rzajq511.gif" alt="Encoded vector index probe icon" /><br /></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<div class="section"><p> Using the example above, the optimizer chooses to create a temporary
|
||
row number bitmap for each of the encoded vector indexes used by this query.
|
||
Each bitmap only identifies those rows that match the selection on the key
|
||
columns for that index. These temporary row number bitmaps are then merged
|
||
together to determine the intersection of the rows selected from each index.
|
||
This intersection is used to form a final temporary row number bitmap that
|
||
will be used to help schedule the I/O paging against the table for the selected
|
||
rows. </p>
|
||
</div>
|
||
<div class="section"><p> The optimizer might choose to perform an index probe with a binary
|
||
radix tree index if an index existed over all three columns. The implementation
|
||
choice is probably decided by the number of rows to be returned and the anticipated
|
||
cost of the I/O associated with each plan. If very few rows will be returned,
|
||
the optimizer probably choose to use the binary radix tree index and perform
|
||
the random I/O against the table. However, selecting more than a few rows
|
||
will cause the optimizer to use the encoded vector indexes because of the
|
||
savings associated with the more efficient scheduled I/O against the table.</p>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="perf21c.htm" title="An encoded vector index is a permanent object that provides access to a table by assigning codes to distinct key values and then representing those values in a vector.">Encoded vector index</a></div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html> |