120 lines
9.7 KiB
HTML
120 lines
9.7 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="Examples of indexes" />
|
|
<meta name="abstract" content="The following index examples are provided to help you create effective indexes." />
|
|
<meta name="description" content="The following index examples are provided to help you create effective indexes." />
|
|
<meta name="DC.subject" content="index, examples, indexes" />
|
|
<meta name="keywords" content="index, examples, indexes" />
|
|
<meta name="DC.Relation" scheme="URI" content="efindex.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="nosort.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="uniqueweight.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="sharedweight.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="greater.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="joinsel.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="joinselshared.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="orderingnosort.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="orderinguniweight.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="orderingshared.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="ordalwcpydta.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="groupnosort.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="groupunique.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="groupshared.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="ordgrpsame.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="ordgrpalwcpydta.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="ordgrpshared.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="ordgrpsharedweight.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="ordgrpdiffcols.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="ordgrpdiffalwcpydta.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="ordgrpshweightsort.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="indexxmp" />
|
|
<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>Examples of indexes</title>
|
|
</head>
|
|
<body id="indexxmp"><a name="indexxmp"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Examples of indexes</h1>
|
|
<div><p>The following index examples are provided to help you create effective
|
|
indexes.</p>
|
|
<div class="section"><p>For the purposes of the examples, assume that three indexes are
|
|
created.</p>
|
|
</div>
|
|
<div class="section"><p>Assume that an index HEXIX was created with *HEX as the sort sequence.
|
|
</p>
|
|
<pre> <strong>CREATE INDEX</strong> HEXIX <strong>ON</strong> STAFF (JOB)</pre>
|
|
</div>
|
|
<div class="section"><p>Assume that an index UNQIX was created with a unique-weight sort
|
|
sequence. </p>
|
|
<pre> <strong>CREATE INDEX</strong> UNQIX <strong>ON</strong> STAFF (JOB)</pre>
|
|
</div>
|
|
<div class="section"><p>Assume that an index SHRIX was created with a shared-weight sort
|
|
sequence. </p>
|
|
<pre> <strong>CREATE INDEX</strong> SHRIX <strong>ON</strong> STAFF (JOB)</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="nosort.htm">Index example: Equals selection with no sort sequence table</a></strong><br />
|
|
Equals selection with no sort sequence table (SRTSEQ(*HEX)).</li>
|
|
<li class="ulchildlink"><strong><a href="uniqueweight.htm">Index example: Equals selection with a unique-weight sort sequence table</a></strong><br />
|
|
Equals selection with a unique-weight sort sequence table (SRTSEQ(*LANGIDUNQ) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="sharedweight.htm">Index example: Equal selection with a shared-weight sort sequence table</a></strong><br />
|
|
Equal selection with a shared-weight sort sequence table (SRTSEQ(*LANGIDSHR) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="greater.htm">Index example: Greater than selection with a unique-weight sort sequence table</a></strong><br />
|
|
Greater than selection with a unique-weight sort sequence table (SRTSEQ(*LANGIDUNQ) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="joinsel.htm">Index example: Join selection with a unique-weight sort sequence table</a></strong><br />
|
|
Join selection with a unique-weight sort sequence table (SRTSEQ(*LANGIDUNQ) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="joinselshared.htm">Index example: Join selection with a shared-weight sort sequence table</a></strong><br />
|
|
Join selection with a shared-weight sort sequence table (SRTSEQ(*LANGIDSHR) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="orderingnosort.htm">Index example: Ordering with no sort sequence table</a></strong><br />
|
|
Ordering with no sort sequence table (SRTSEQ(*HEX)).</li>
|
|
<li class="ulchildlink"><strong><a href="orderinguniweight.htm">Index example: Ordering with a unique-weight sort sequence table</a></strong><br />
|
|
Ordering with a unique-weight sort sequence table (SRTSEQ(*LANGIDUNQ) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="orderingshared.htm">Index example: Ordering with a shared-weight sort sequence table</a></strong><br />
|
|
Ordering with a shared-weight sort sequence table (SRTSEQ(*LANGIDSHR) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="ordalwcpydta.htm">Index example: Ordering with ALWCPYDTA(*OPTIMIZE) and a unique-weight sort sequence table</a></strong><br />
|
|
Ordering with ALWCPYDTA(*OPTIMIZE) and a unique-weight sort sequence table (SRTSEQ(*LANGIDUNQ) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="groupnosort.htm">Index example: Grouping with no sort sequence table</a></strong><br />
|
|
Grouping with no sort sequence table (SRTSEQ(*HEX)).</li>
|
|
<li class="ulchildlink"><strong><a href="groupunique.htm">Index example: Grouping with a unique-weight sort sequence table</a></strong><br />
|
|
Grouping with a unique-weight sort sequence table (SRTSEQ(*LANGIDUNQ) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="groupshared.htm">Index example: Grouping with a shared-weight sort sequence table</a></strong><br />
|
|
Grouping with a shared-weight sort sequence table (SRTSEQ(*LANGIDSHR) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="ordgrpsame.htm">Index example: Ordering and grouping on the same columns with a unique-weight sort sequence table</a></strong><br />
|
|
Ordering and grouping on the same columns with a unique-weight sort sequence table (SRTSEQ(*LANGIDUNQ) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="ordgrpalwcpydta.htm">Index example: Ordering and grouping on the same columns with ALWCPYDTA(*OPTIMIZE) and a unique-weight sort sequence table</a></strong><br />
|
|
Ordering and grouping on the same columns with ALWCPYDTA(*OPTIMIZE) and a unique-weight sort sequence table (SRTSEQ(*LANGIDUNQ) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="ordgrpshared.htm">Index example: Ordering and grouping on the same columns with a shared-weight sort sequence table</a></strong><br />
|
|
Ordering and grouping on the same columns with a shared-weight sort sequence table (SRTSEQ(*LANGIDSHR) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="ordgrpsharedweight.htm">Index example: Ordering and grouping on the same columns with ALWCPYDTA(*OPTIMIZE) and a shared-weight sort sequence table</a></strong><br />
|
|
Ordering and grouping on the same columns with ALWCPYDTA(*OPTIMIZE) and a shared-weight sort sequence table (SRTSEQ(*LANGIDSHR) LANGID(ENU).</li>
|
|
<li class="ulchildlink"><strong><a href="ordgrpdiffcols.htm">Index example: Ordering and grouping on different columns with a unique-weight sort sequence table</a></strong><br />
|
|
Ordering and grouping on different columns with a unique-weight sort sequence table (SRTSEQ(*LANGIDUNQ) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="ordgrpdiffalwcpydta.htm">Index example: Ordering and grouping on different columns with ALWCPYDTA(*OPTIMIZE) and a unique-weight sort sequence table</a></strong><br />
|
|
Ordering and grouping on different columns with ALWCPYDTA(*OPTIMIZE) and a unique-weight sort sequence table (SRTSEQ(*LANGIDUNQ) LANGID(ENU)).</li>
|
|
<li class="ulchildlink"><strong><a href="ordgrpshweightsort.htm">Index example: Ordering and grouping on different columns with ALWCPYDTA(*OPTIMIZE) and a shared-weight sort sequence table</a></strong><br />
|
|
Ordering and grouping on different columns with ALWCPYDTA(*OPTIMIZE) and a shared-weight sort sequence table (SRTSEQ(*LANGIDSHR) LANGID(ENU)).</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="efindex.htm" title="DB2 Universal Database for iSeries provides two basic means for accessing tables: a table scan and an index-based retrieval. Index-based retrieval is typically more efficient than table scan when less than 20% of the table rows are selected.">Creating an index strategy</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |