forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
41 lines
4.2 KiB
HTML
41 lines
4.2 KiB
HTML
<a name="EN-US_TOPIC_0000001098654758"></a><a name="EN-US_TOPIC_0000001098654758"></a>
|
|
|
|
<h1 class="topictitle1">Selecting a Distribution Mode</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001098654758__a3cb42941caa14e7d90c1514d5784c49f">In replication mode, full data in a table is copied to each DN in the cluster. This mode is used for tables containing a small volume of data. Full data in a table stored on each DN avoids data redistribution during the <strong id="EN-US_TOPIC_0000001098654758__b158731457424">JOIN</strong> operation. This reduces network costs and plan segments (each with a thread), but generates much redundant data. Generally, replication is only used for small dimension tables.</p>
|
|
<p id="EN-US_TOPIC_0000001098654758__a5538e758bfce4758adf4688e5d436fd6">In hash mode, hash values are generated for one or more columns. You can obtain the storage location of a tuple based on the mapping between DNs and the hash values. In a hash table, I/O resources on each node can be used for data read/write, which greatly accelerates the read/write of a table. Generally, a table containing a large amount of data is defined as a hash table.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001098654758__t96d578ad8418495b9f89d5660dfc18d8" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001098654758__r6d47328d94bc47a19c573843c94381e0"><th align="left" class="cellrowborder" valign="top" width="16.93%" id="mcps1.3.3.1.4.1.1"><p id="EN-US_TOPIC_0000001098654758__a5f63996a0e7f41f5b205102c837b2c46">Policy</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="49.74%" id="mcps1.3.3.1.4.1.2"><p id="EN-US_TOPIC_0000001098654758__af83b45faa3354bddbdcb2670513e5122">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33%" id="mcps1.3.3.1.4.1.3"><p id="EN-US_TOPIC_0000001098654758__ae2ac075156d846fcbee19d34da7337dc">Scenario</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001098654758__rf0a00b3c5077429db9fa9a46e0031298"><td class="cellrowborder" valign="top" width="16.93%" headers="mcps1.3.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001098654758__ad559b18c7b8348b39f6ef201bc392045">Hash</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.74%" headers="mcps1.3.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001098654758__aa231150682484df396a1a63cb522fba1">Table data is distributed on all DNs in the cluster.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.3.1.4.1.3 "><p id="EN-US_TOPIC_0000001098654758__aa876866ab9cf47bf9b4954c1ac9e7dfa">Fact tables containing a large amount of data</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001098654758__r659001c0bec345f0a79a9b0ffeea5cca"><td class="cellrowborder" valign="top" width="16.93%" headers="mcps1.3.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001098654758__a9bdf834d763a421ba0ff15052df5bcbc">Replication</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.74%" headers="mcps1.3.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001098654758__a8a88424b71cc455f8093cdd450c98563">Full data in a table is stored on each DN in the cluster.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.3.1.4.1.3 "><p id="EN-US_TOPIC_0000001098654758__a5b779edb582e4be1a210ef17368754aa">Small tables and dimension tables</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001098654758__p27898517161232">As shown in <a href="#EN-US_TOPIC_0000001098654758__fig50793519161135">Figure 1</a>, <strong id="EN-US_TOPIC_0000001098654758__b87218647010401">T1</strong> is a replication table and <strong id="EN-US_TOPIC_0000001098654758__b63200894710401">T2</strong> is a hash table.</p>
|
|
<div class="fignone" id="EN-US_TOPIC_0000001098654758__fig50793519161135"><a name="EN-US_TOPIC_0000001098654758__fig50793519161135"></a><a name="fig50793519161135"></a><span class="figcap"><b>Figure 1 </b>Replication table and hash table</span><br><span><img id="EN-US_TOPIC_0000001098654758__image17893935925" src="figure/en-us_image_0000001145495133.png"></span></div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0437.html">Reviewing and Modifying a Table Definition</a></div>
|
|
</div>
|
|
</div>
|
|
|