84 lines
5.5 KiB
HTML
84 lines
5.5 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="Temporary hash table" />
|
||
|
<meta name="abstract" content="The temporary hash table is a temporary object that allows the optimizer to collate the rows based upon a column or set of columns. The hash table can be either scanned or probed by the optimizer to satisfy different operations of the query." />
|
||
|
<meta name="description" content="The temporary hash table is a temporary object that allows the optimizer to collate the rows based upon a column or set of columns. The hash table can be either scanned or probed by the optimizer to satisfy different operations of the query." />
|
||
|
<meta name="DC.subject" content="definitions, temporary hash table, hash table, access method, access method" />
|
||
|
<meta name="keywords" content="definitions, temporary hash table, hash table, access method, access method" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzajqtempobj.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzajqhtblscan.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzajqhtblprobe.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="rzajqtemphash" />
|
||
|
<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>Temporary hash table</title>
|
||
|
</head>
|
||
|
<body id="rzajqtemphash"><a name="rzajqtemphash"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Temporary hash table</h1>
|
||
|
<div><p>The temporary hash table is a temporary object that allows the
|
||
|
optimizer to collate the rows based upon a column or set of columns. The hash
|
||
|
table can be either scanned or probed by the optimizer to satisfy different
|
||
|
operations of the query.</p>
|
||
|
<div class="section"><p>A temporary hash table is an efficient data structure because
|
||
|
the rows are organized for quick and easy retrieval after population has occurred.
|
||
|
This is primarily due to the hash table remaining resident within main memory
|
||
|
so as to avoid any I/Os associated with either the scan or probe against the
|
||
|
temporary object. The optimizer will determine the optimal size for the hash
|
||
|
table based upon the number of unique combinations (for example, cardinality)
|
||
|
of the columns used as keys for the creation.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>Additionally the hash table can be populated with all of the necessary
|
||
|
columns to satisfy any further processing, avoiding any random I/Os associated
|
||
|
with a Table Probe operation. However, the optimizer does have the ability
|
||
|
to selectively include columns in the hash table when the calculated size
|
||
|
will exceed the memory pool storage available for this query. In those cases,
|
||
|
a Table Probe operation is required to recollect the missing columns from
|
||
|
the hash table before the selected rows can be processed.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>The optimizer also has the ability to populate the hash table
|
||
|
with distinct values. If the query contains grouping or distinct processing,
|
||
|
then all of the rows with the same key value are not required to be stored
|
||
|
in the temporary object. They are still collated, but the distinct processing
|
||
|
is performed during the population of the hash table itself. This allows a
|
||
|
simple scan to be performed on the result in order to complete the grouping
|
||
|
or distinct operation.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>A temporary hash table is an internal data structure and can only
|
||
|
be created by the database manager</p>
|
||
|
</div>
|
||
|
<div class="section"><p>Visual explain icon: </p>
|
||
|
</div>
|
||
|
<div class="section"><p><img src="rzajq512.gif" alt="Temporary hash table icon" /></p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="rzajqhtblscan.htm">Hash table scan</a></strong><br />
|
||
|
During a Hash Table Scan operation, the entire temporary hash table is scanned and all of the entries contained within the hash table will be processed.</li>
|
||
|
<li class="ulchildlink"><strong><a href="rzajqhtblprobe.htm">Hash table probe</a></strong><br />
|
||
|
A hash table probe operation is used to retrieve rows from a temporary hash table based upon a probe lookup operation.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzajqtempobj.htm" title="Temporary objects are created by the optimizer in order to process a query. In general, these temporary objects are internal objects and cannot be accessed by a user.">Temporary objects and access methods</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|