122 lines
7.6 KiB
HTML
122 lines
7.6 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 symbol table scan" />
|
||
|
<meta name="abstract" content="An encoded vector index symbol table scan operation is used to retrieve the entries from the symbol table portion of the index." />
|
||
|
<meta name="description" content="An encoded vector index symbol table scan operation is used to retrieve the entries from the symbol table portion of the index." />
|
||
|
<meta name="DC.subject" content="definitions, encoded vector index symbol table scan access method, index, encoded vector index symbol table scan access method, encoded vector index symbol table scan, access method, encoded vector index symbol table scan" />
|
||
|
<meta name="keywords" content="definitions, encoded vector index symbol table scan access method, index, encoded vector index symbol table scan access method, encoded vector index symbol table scan, access method, encoded vector index symbol table scan" />
|
||
|
<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="rzajqeviscan" />
|
||
|
<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 symbol table scan</title>
|
||
|
</head>
|
||
|
<body id="rzajqeviscan"><a name="rzajqeviscan"><!-- --></a>
|
||
|
<img src="./delta.gif" alt="Start of change" /><!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Encoded vector index symbol table scan</h1>
|
||
|
<div><p>An encoded vector index symbol table scan operation is used to
|
||
|
retrieve the entries from the symbol table portion of the index. </p>
|
||
|
<div class="section"><p>All entries (symbols) in the symbol table will be sequentially
|
||
|
scanned, though the sequence of the resulting entries is not in any guaranteed
|
||
|
order. The symbol table can be used by the optimizer to satisfy group by or
|
||
|
distinct portions of a query request. Any selection is applied to every entry
|
||
|
in the symbol table. All entries are retrieved directly from the symbol table
|
||
|
portion of the index without any access to the vector portion of the index
|
||
|
nor any access to the records in the associated table over which the EVI is
|
||
|
built.</p>
|
||
|
|
||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption>Table 1. Encoded vector index symbol table scan attributes</caption><thead align="left"><tr><th valign="top" width="30.76923076923077%" id="d0e40">Data access method</th>
|
||
|
<th valign="top" width="69.23076923076923%" id="d0e42">Encoded vector index symbol table scan</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td valign="top" width="30.76923076923077%" headers="d0e40 "><strong>Description</strong></td>
|
||
|
<td valign="top" width="69.23076923076923%" headers="d0e42 ">Sequentially scan and process all of the symbol table
|
||
|
entries associated with the index. Any selection is applied to every entry
|
||
|
in the symbol table. Selected entries are retrieved directly without any access
|
||
|
to the vector or the associated table</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="30.76923076923077%" headers="d0e40 "><strong>Advantages</strong></td>
|
||
|
<td valign="top" width="69.23076923076923%" headers="d0e42 "><ul><li>Pre-summarized results are readily available</li>
|
||
|
<li>Only processes the unique values in the symbol table, avoiding processing
|
||
|
table records.</li>
|
||
|
<li>Extract all of the data from the index unique key values, thus eliminating
|
||
|
the need for a Table Probe or vector scan.</li>
|
||
|
</ul>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="30.76923076923077%" headers="d0e40 "><strong>Considerations</strong></td>
|
||
|
<td valign="top" width="69.23076923076923%" headers="d0e42 ">Dramatic performance improvement for grouping queries
|
||
|
where the resulting number of groups is relatively small compared to the number
|
||
|
of records in the underlying table. Can perform poorly when there are a large
|
||
|
number of groups involved such that the symbol table is very large, especially
|
||
|
if a large portion of symbol table has been put into the overflow area.</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="30.76923076923077%" headers="d0e40 "><strong>Likely to be used</strong></td>
|
||
|
<td valign="top" width="69.23076923076923%" headers="d0e42 "><ul><li>When asking for GROUP BY, DISTINCT, COUNT or COUNT DISTINCT from a single
|
||
|
table and the referenced column(s) are in the key definition </li>
|
||
|
<li>When the number of unique values in the column(s) of the key definition
|
||
|
is small relative to the number of records in the underlying table.</li>
|
||
|
<li>When there is no selection (Where clause) within the query or the selection
|
||
|
does not reduce the result set very much.</li>
|
||
|
</ul>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="30.76923076923077%" headers="d0e40 "><strong>Example SQL statement</strong></td>
|
||
|
<td valign="top" width="69.23076923076923%" headers="d0e42 "><pre>CREATE ENCODED VECTOR INDEX EVI1 ON Sales (Region) </pre>
|
||
|
Example 1<pre>SELECT Region, count(*)
|
||
|
FROM Sales
|
||
|
GROUP BY Region
|
||
|
OPTIMIZE FOR ALL ROWS</pre>
|
||
|
Example 2<pre>SELECT DISTINCT Region
|
||
|
FROM Sales
|
||
|
OPTIMIZE FOR ALL ROWS</pre>
|
||
|
Example 3<pre>SELECT COUNT(DISTINCT Region)
|
||
|
FROM Sales </pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="30.76923076923077%" headers="d0e40 "><strong>Messages indicating use</strong></td>
|
||
|
<td valign="top" width="69.23076923076923%" headers="d0e42 "><ul><li>Optimizer Debug: <pre>CPI4328 -- Access path of file EVI1 was used by query. </pre>
|
||
|
</li>
|
||
|
<li>PRTSQLINF: <pre>SQL4008 -- Index EVI1 used for table 1.SQL4010</pre>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="30.76923076923077%" headers="d0e40 "><strong>SMP parallel enabled</strong></td>
|
||
|
<td valign="top" width="69.23076923076923%" headers="d0e42 ">No. Typically not critical as the 'grouping'
|
||
|
has already been performed during the index build.</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="30.76923076923077%" headers="d0e40 "><strong>Also referred to as</strong></td>
|
||
|
<td valign="top" width="69.23076923076923%" headers="d0e42 "> Encoded Vector Index table scan, Preload</td>
|
||
|
</tr>
|
||
|
<tr><td valign="top" width="30.76923076923077%" headers="d0e40 "><strong>Visual Explain icon</strong></td>
|
||
|
<td valign="top" width="69.23076923076923%" headers="d0e42 "><br /><img src="rzajq557.gif" alt="Encoded vector index probe icon" /><br /></td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</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>
|
||
|
<img src="./deltaend.gif" alt="End of change" /></body>
|
||
|
</html>
|