ibm-information-center/dist/eclipse/plugins/i5OS.ic.dbmult_5.4.0.1/joins.htm

84 lines
5.9 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="Implementation and optimization of join operations with DB2 Multisystem" />
<meta name="abstract" content="In addition to the performance considerations for nondistributed join queries, more performance considerations exist for queries involving distributed files." />
<meta name="description" content="In addition to the performance considerations for nondistributed join queries, more performance considerations exist for queries involving distributed files." />
<meta name="DC.subject" content="join, implementation, optimization, query, join implementation, join optimization, partition compatible, definition, data types, that are partition compatible" />
<meta name="keywords" content="join, implementation, optimization, query, join implementation, join optimization, partition compatible, definition, data types, that are partition compatible" />
<meta name="DC.Relation" scheme="URI" content="qqp.htm" />
<meta name="DC.Relation" scheme="URI" content="colocated.htm" />
<meta name="DC.Relation" scheme="URI" content="directed.htm" />
<meta name="DC.Relation" scheme="URI" content="repartitioned.htm" />
<meta name="DC.Relation" scheme="URI" content="broadcast.htm" />
<meta name="DC.Relation" scheme="URI" content="joinopt.htm" />
<meta name="DC.Relation" scheme="URI" content="joinopt.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="joins" />
<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>Implementation and optimization of join operations with DB2 Multisystem</title>
</head>
<body id="joins"><a name="joins"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Implementation and optimization of join operations with DB2<sup>®</sup> Multisystem</h1>
<div><p>In addition to the performance considerations for nondistributed
join queries, more performance considerations exist for queries involving
distributed files.</p>
<p>Joins can be performed only when the data is partition compatible. The
distributed query optimizer generates a plan that makes data partition compatible,
which might involve moving data between nodes.</p>
<p>Data is <em>partition compatible</em> when the data in the partitioning keys
of both files uses the same node group and hashes to the same node. For example,
the same numeric value stored in either a large-integer field or a small-integer
field hashes to the same value.</p>
<p>The data types that follow are partition compatible:</p>
<ul><li>Large integer (4-byte), small integer (2-byte), packed decimal, and zoned
numeric.</li>
<li>Fixed-length and varying-length SBCS character and DBCS-open, -either,
or -only.</li>
<li>Fixed-length and varying-length graphic.</li>
</ul>
<p>Date, time, timestamp, and floating-point numeric data types are not partition
compatible because they cannot be partitioning keys.</p>
<p>Joins involving distributed files are classified into four types: collocated,
directed, repartitioned, and broadcast. The following sections define the
types of joins and give examples of the different join types.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="colocated.htm">Collocated join with DB2 Multisystem</a></strong><br />
In a collocated join, corresponding records of files being joined exist on the same node.</li>
<li class="ulchildlink"><strong><a href="directed.htm">Directed join with DB2 Multisystem</a></strong><br />
In the directed join, the partitioning keys of at least one of the files are used as the join fields.</li>
<li class="ulchildlink"><strong><a href="repartitioned.htm">Repartitioned join with DB2 Multisystem</a></strong><br />
In a repartitioned join, the partitioning keys of the files are not used as the join fields.</li>
<li class="ulchildlink"><strong><a href="broadcast.htm">Broadcast join with DB2 Multisystem</a></strong><br />
In a broadcast join, all of the selected records of one file are sent or broadcast to all the nodes of the other file before the join is performed.</li>
<li class="ulchildlink"><strong><a href="joinopt.htm">Join optimization with DB2 Multisystem</a></strong><br />
The distributed query optimizer generates a plan to join distributed files.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="qqp.htm" title="This topic provides you with some guidelines for designing queries so that they use query resources more efficiently when you run queries that use distributed files.">Query design for performance with DB2 Multisystem</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="joinopt.htm" title="The distributed query optimizer generates a plan to join distributed files.">Join optimization with DB2 Multisystem</a></div>
</div>
</div>
</body>
</html>