64 lines
5.4 KiB
HTML
64 lines
5.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="concept" />
|
|
<meta name="DC.Title" content="Grouping optimization" />
|
|
<meta name="abstract" content="DB2 Universal Database for iSeries has certain techniques to use when the optimizer encounters grouping. The query optimizer chooses its methods for optimizing your query." />
|
|
<meta name="description" content="DB2 Universal Database for iSeries has certain techniques to use when the optimizer encounters grouping. The query optimizer chooses its methods for optimizing your query." />
|
|
<meta name="DC.subject" content="grouping optimization, optimization, grouping" />
|
|
<meta name="keywords" content="grouping optimization, optimization, grouping" />
|
|
<meta name="DC.Relation" scheme="URI" content="per0001.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="grpinghashimp.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="idxgrpingimp.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqgroupcols.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqgroupaddcols.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqgroupidx.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzajqgrouptrig.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="groupopt" />
|
|
<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>Grouping optimization</title>
|
|
</head>
|
|
<body id="groupopt"><a name="groupopt"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Grouping optimization</h1>
|
|
<div><p><span class="keyword">DB2 Universal Database™ for iSeries™</span> has certain
|
|
techniques to use when the optimizer encounters grouping. The query optimizer
|
|
chooses its methods for optimizing your query.</p>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="grpinghashimp.htm">Grouping hash implementation</a></strong><br />
|
|
This technique uses the base hash access method to perform grouping or summarization of the selected table rows. For each selected row, the specified grouping value is run through the hash function. The computed hash value and grouping value are used to quickly find the entry in the hash table corresponding to the grouping value.</li>
|
|
<li class="ulchildlink"><strong><a href="idxgrpingimp.htm">Index grouping implementation</a></strong><br />
|
|
There are two primary ways to implement grouping via an index: Ordered grouping and pre-summarized processing.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajqgroupcols.htm">Optimizing grouping by eliminating grouping columns</a></strong><br />
|
|
All of the grouping columns are evaluated to determine if they can be removed from the list of grouping columns. Only those grouping columns that have isolatable selection predicates with an equal operator specified can be considered. This guarantees that the column can only match a single value and will not help determine a unique group.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajqgroupaddcols.htm">Optimizing grouping by adding additional grouping columns</a></strong><br />
|
|
The same logic that is applied to removing grouping columns can also be used to add additional grouping columns to the query. This is only done when you are trying to determine if an index can be used to implement the grouping.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajqgroupidx.htm">Optimizing grouping by using index skip key processing</a></strong><br />
|
|
Index Skip Key processing can be used when grouping with the keyed sequence implementation algorithm which uses an existing index. It is a specialized version of ordered grouping that processes very few records in each group rather than all records in each group.</li>
|
|
<li class="ulchildlink"><strong><a href="rzajqgrouptrig.htm">Optimizing grouping by removing read triggers</a></strong><br />
|
|
For queries involving physical files or tables with read triggers, group by triggers will always involve a temporary file before the group by processing, and will therefore slow down these queries.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="per0001.htm" title="This overview of the query optimizer provides guidelines for designing queries that will perform and will use server resources more efficiently.">Processing queries: Overview</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |