forked from docs/doc-exports
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>
140 lines
15 KiB
HTML
140 lines
15 KiB
HTML
<a name="EN-US_TOPIC_0000001233883327"></a><a name="EN-US_TOPIC_0000001233883327"></a>
|
|
|
|
<h1 class="topictitle1">PG_EXT_STATS</h1>
|
|
<div id="body1530499427337"><p id="EN-US_TOPIC_0000001233883327__p8060118"><strong id="EN-US_TOPIC_0000001233883327__b899153719318">PG_EXT_STATS</strong> displays extension statistics stored in the <a href="dws_04_0620.html">PG_STATISTIC_EXT</a> table. The extension statistics means multiple columns of statistics.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233883327__t2fb838a609734a73a66b82e9bb6c6c22" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_EXT_STATS columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001233883327__r786ec905108b4753852b37fefe59fc07"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.2.5.1.1"><p id="EN-US_TOPIC_0000001233883327__ac46a7c9792314cbeb536d98a848a55cb">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.2.5.1.2"><p id="EN-US_TOPIC_0000001233883327__a1e665cfd723f4f5b907c3e55b4fc4c35">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.5.1.3"><p id="EN-US_TOPIC_0000001233883327__a375f91928065491589c6d10941d5cf90">Reference</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.5.1.4"><p id="EN-US_TOPIC_0000001233883327__aed5d5a4111504f02aac9e0892da76d68">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233883327__r704e2fe0c29e4dc5a79d60753591229e"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__a1e605b46b1ef44139b034e8e203c869b">schemaname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__aa5b23f34f2ca41589f472195b6322c09">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__af4cabbd2b3584df79d86db11a38b61ca"><a href="dws_04_0600.html">PG_NAMESPACE</a>.nspname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__a62a43a5336f9457cbf1d64fbb17ae72b">Name of the schema that contains a table</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__r79bb69b1c21a44caa7750d973a2f6231"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__a379e4948372a4d929a6246fd5a0cfe59">tablename</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__af670c602dcd84b12b3393ce62d912e7a">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__a5ea5c6966eef47528a09c262028ea514"><a href="dws_04_0578.html">PG_CLASS</a>.relname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__afdad487debd34ee895a21fe3564de3af">Name of a table</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__row18168535104419"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__p1116816355446">attname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__p816833544417">int2vector</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__p171686353448"><a href="dws_04_0620.html">PG_STATISTIC_EXT</a>.stakey</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__p18168203516448">Indicates the columns to be combined for collecting statistics.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__rb19633779ac1466ab60d7cb5dbc2945a"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__aaa7df26da29c4788ad183d7cb19049f6">inherited</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__a0228884b6475443ba63f6076ae13bc74"><span id="EN-US_TOPIC_0000001233883327__text15054279389">boolean</span></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__a4cfcd0404855484087266a6b7cf9633d">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__ae8d5aefe761942c691a9b8bfb68f0e3c">Includes inherited sub-columns if the value is <strong id="EN-US_TOPIC_0000001233883327__b25101742152720">true</strong>; otherwise, indicates the column in a specified table.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__r41cfa753ace140b985f15ba1df5ec1bb"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__a7b080cca1d0648a1ac26ff6ca1744049">null_frac</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__aa1070a813895435f8d93a5eaa194fa76">real</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__a3c69392e348b44a88e73e7f65690c481">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__a21ec25727613475eb90f68175d951dda">Percentage of column combinations that are null to all records</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__r5c27744bf9ad4bcebba17d6f370763af"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__a96483df6327b41ebb472c9a09a530c16">avg_width</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__a341c07478d5444378b9246bbdbc39f46">integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__ab049578172024801b361d3befd78273d">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__abd5b7ce579f84077a3563c124c96f440">Average width of column combinations. The unit is byte.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__r1feb18465c6c416ea811bb985c4de684"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__ac3a9585c790c45bea33cdd27ea7c80c0">n_distinct</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__a63c161d771684306ab8e81da8c3ff85d">real</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__ae3c08b30fcdb4857bdf26dce2329ef8e">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><ul id="EN-US_TOPIC_0000001233883327__ue2784401b4794f52bcd5988597aa9246"><li id="EN-US_TOPIC_0000001233883327__l49d54702732e458e83399ee63c22ac5b">Estimated number of distinct values in a column combination if the value is greater than 0</li><li id="EN-US_TOPIC_0000001233883327__l0c9b90cdc55c4962bf8193f69c9027fc">Negative of the number of distinct values divided by the number of rows if the value is less than 0</li></ul>
|
|
<p id="EN-US_TOPIC_0000001233883327__af2c0a3af4dc441568767d7999b5b0fa1"></p>
|
|
<ul id="EN-US_TOPIC_0000001233883327__ul9851195416453"><li id="EN-US_TOPIC_0000001233883327__li6440195854511">The number of distinct values is unknown if the value is <strong id="EN-US_TOPIC_0000001233883327__b11722840112019">0</strong>.<div class="note" id="EN-US_TOPIC_0000001233883327__note995102314448"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001233883327__p191724184419">The negated form is used when ANALYZE believes that the number of distinct values is likely to increase as the table grows.</p>
|
|
<p id="EN-US_TOPIC_0000001233883327__p169182417443">The positive form is used when the column seems to have a fixed number of possible values. For example, <strong id="EN-US_TOPIC_0000001233883327__b142720605741225">-1</strong> indicates that the number of distinct values is the same as the number of rows for a column combination.</p>
|
|
</div></div>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__r5bac768d13cf40bd88f51ccc7a778f46"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__af43a6a19777844eda2584132fd82a2aa">n_dndistinct</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__a770b8c06abb04e74b2945ff33e86075f">real</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__ac6bfed91290649c2bde78b6c064bbb1f">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__a994ac011bbb14e9398645cfaeb7c8094">Number of unique not-null data values in the <strong id="EN-US_TOPIC_0000001233883327__b84235270695425">dn1</strong> column combination</p>
|
|
<ul id="EN-US_TOPIC_0000001233883327__u7bf2869968d04754822f7a41c9c5ae96"><li id="EN-US_TOPIC_0000001233883327__l1e65599868a14fa9a333e421b7d40e36">Exact number of distinct values if the value is greater than 0</li><li id="EN-US_TOPIC_0000001233883327__lda9cac08caa446b4a624cd0e9ffcf0c0">Negative of the number of distinct values divided by the number of rows if the value is less than 0 For example, if a value in a column combination appears twice in average, <strong id="EN-US_TOPIC_0000001233883327__b84235270616816">n_dndistinct</strong> equals <strong id="EN-US_TOPIC_0000001233883327__b7216559192219">-0.5</strong>.</li><li id="EN-US_TOPIC_0000001233883327__ld52045d6afea4b1da742ff77d6f839c5">The number of distinct values is unknown if the value is <strong id="EN-US_TOPIC_0000001233883327__b588635612402">0</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__r15e25724c73a41bca2bd439a263f0586"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__aab0647a399614cb8bc8a9d4a7604bc23">most_common_vals</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__a4e18bc7133ec49ec988ac2a49f8d610b">anyarray</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__a0236ad1f110c44859f71e40c1713713a">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__a7c6a6b2d5f6a4ff29d1b4fae916617d9">List of the most common values in a column combination. If this combination does not have the most common values, <strong id="EN-US_TOPIC_0000001233883327__b15394205082019">most_common_vals_null</strong> will be <strong id="EN-US_TOPIC_0000001233883327__b16394175032013">NULL</strong>. None of the most common values in <strong id="EN-US_TOPIC_0000001233883327__b1070618559206">most_common_vals</strong> is <strong id="EN-US_TOPIC_0000001233883327__b77065552200">NULL</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__rd5abc324e8e3459783af6995758b85f3"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__a39517f3f773d4ababa0f2af896ae483e">most_common_freqs</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__a6f1f5d2832e34bb98e0b27fbc90309f9">real[]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__a684e048068b44c2da70e3d12d085b40a">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__a7f15c91635f24874bb8920725802fabf">List of the frequencies of the most common values, that is, the number of occurrences of each value divided by the total number of rows. (NULL if <strong id="EN-US_TOPIC_0000001233883327__b16611528122716">most_common_vals</strong> is <strong id="EN-US_TOPIC_0000001233883327__b1684210301278">NULL</strong>)</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__row481288129300"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__p326086409306">most_common_vals_null</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__p240541499306">anyarray</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__p22290309306">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__p463337739306">List of the most common values in a column combination. If this combination does not have the most common values, <strong id="EN-US_TOPIC_0000001233883327__b2082014253216">most_common_vals_null</strong> will be <strong id="EN-US_TOPIC_0000001233883327__b48200257210">NULL</strong>. At least one of the common values in <strong id="EN-US_TOPIC_0000001233883327__b191471812175913">most_common_vals_null</strong> is <strong id="EN-US_TOPIC_0000001233883327__b319792510405">NULL</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233883327__r1b6f860905fb4c22b8c438920210ed50"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001233883327__p215619499306">most_common_freqs_null</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001233883327__p16874219306">real[]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001233883327__p24634229306">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001233883327__p653194959306">List of the frequencies of the most common values, that is, the number of occurrences of each value divided by the total number of rows. (<strong id="EN-US_TOPIC_0000001233883327__b1318619684210">NULL</strong> if <strong id="EN-US_TOPIC_0000001233883327__b92807556412">most_common_vals_null</strong> is <strong id="EN-US_TOPIC_0000001233883327__b22803554418">NULL</strong>)</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>
|
|
|