doc-exports/docs/dws/dev/dws_04_0805.html
Lu, Huayi ef0ada5a59 DWS DEV 20240716 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-11-02 09:07:47 +00:00

87 lines
7.1 KiB
HTML

<a name="EN-US_TOPIC_0000001510162717"></a><a name="EN-US_TOPIC_0000001510162717"></a>
<h1 class="topictitle1">PGXC_GET_TABLE_SKEWNESS</h1>
<div id="body1547169602820"><p id="EN-US_TOPIC_0000001510162717__p8060118"><strong id="EN-US_TOPIC_0000001510162717__b13464201255510">PGXC_GET_TABLE_SKEWNESS</strong> displays the data skew on tables in the current database. Only the system administrator or the preset role <strong id="EN-US_TOPIC_0000001510162717__b61281945142518">gs_role_read_all_stats</strong> can access this view.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001510162717__t09d8e10f76724678a8f221dd29db736a" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PGXC_GET_TABLE_SKEWNESS columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001510162717__r296db8ff4a4f4195b3fd7d935ac3436d"><th align="left" class="cellrowborder" valign="top" width="33.33%" id="mcps1.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001510162717__aabed0b68691942108b0e3aa157377da7">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.919999999999998%" id="mcps1.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001510162717__aae8adcb14b634a4793c5c29a8ded37cd">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.75%" id="mcps1.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001510162717__a4d5efd63bff341d59af7eb1359385af9">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001510162717__r4058f6bdc9254911b191aa0e08d7edb6"><td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001510162717__p1160011111301">schemaname</p>
</td>
<td class="cellrowborder" valign="top" width="20.919999999999998%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001510162717__ac9c372b991894c798b9fecec1fe03ea8">name</p>
</td>
<td class="cellrowborder" valign="top" width="45.75%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001510162717__aa4d470d9917d4fedbce5cd58c754ce42">Schema name of a table</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510162717__r9a69c15440fd4b3d86b38804ac7efffd"><td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001510162717__p155841225203011">tablename</p>
</td>
<td class="cellrowborder" valign="top" width="20.919999999999998%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001510162717__a6f502ef221ec4b8d8e5393022effc5bd">name</p>
</td>
<td class="cellrowborder" valign="top" width="45.75%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001510162717__a13de41723a05484d86ab3c303d4c522a">Name of a table</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510162717__row1596942488"><td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001510162717__p897184184816">totalsize</p>
</td>
<td class="cellrowborder" valign="top" width="20.919999999999998%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001510162717__p89817484814">numeric</p>
</td>
<td class="cellrowborder" valign="top" width="45.75%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001510162717__p1099145484">Total size of a table, in bytes</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510162717__r3b0439badf02493a9fc3a84029209848"><td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001510162717__p1219664054117">avgsize</p>
</td>
<td class="cellrowborder" valign="top" width="20.919999999999998%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001510162717__a32fd73348caf4482ad7acd39e5abfe13">numeric(1000,0)</p>
</td>
<td class="cellrowborder" valign="top" width="45.75%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001510162717__aca413da9e4ea45aba0d8b389dcf956ec">Average table size (total table size divided by the number of DNs), which is the ideal size of tables distributed on each DN</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510162717__row204781949282"><td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001510162717__p194796491814">maxratio</p>
</td>
<td class="cellrowborder" valign="top" width="20.919999999999998%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001510162717__p3479124915820">numeric(10,3)</p>
</td>
<td class="cellrowborder" valign="top" width="45.75%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001510162717__p204793499820">Ratio of the maximum table size on a single DN to to <strong id="EN-US_TOPIC_0000001510162717__b7624104515711">avgsize</strong></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510162717__row4302327154218"><td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001510162717__p14386104410421">minratio</p>
</td>
<td class="cellrowborder" valign="top" width="20.919999999999998%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001510162717__p173030279421">numeric(10,3)</p>
</td>
<td class="cellrowborder" valign="top" width="45.75%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001510162717__p74751749105714">Ratio of the minimum table size on a single DN to <strong id="EN-US_TOPIC_0000001510162717__b61262048165717">avgsize</strong></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510162717__row174687374424"><td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001510162717__p04691337114217">skewsize</p>
</td>
<td class="cellrowborder" valign="top" width="20.919999999999998%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001510162717__p20469133724219">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="45.75%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001510162717__p872812665817">Table skew rate (the maximum table size on a single DN minus the minimum table size on a single DN)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510162717__row157104984219"><td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001510162717__p16874914210">skewratio</p>
</td>
<td class="cellrowborder" valign="top" width="20.919999999999998%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001510162717__p179134915423">numeric(10,3)</p>
</td>
<td class="cellrowborder" valign="top" width="45.75%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001510162717__p199174924217">Table skew rate (skewsize/avgsize)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510162717__row14389195612816"><td class="cellrowborder" valign="top" width="33.33%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001510162717__p1118111812436">skewstddev</p>
</td>
<td class="cellrowborder" valign="top" width="20.919999999999998%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001510162717__p1636555125610">numeric(1000,0)</p>
</td>
<td class="cellrowborder" valign="top" width="45.75%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001510162717__p14390856089">Standard deviation of table distribution (For two tables of the same size, a larger deviation indicates a more severe skew.)</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0639.html">System Views</a></div>
</div>
</div>