doc-exports/docs/dws/dev/dws_04_1207.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

164 lines
17 KiB
HTML

<a name="EN-US_TOPIC_0000001510283401"></a><a name="EN-US_TOPIC_0000001510283401"></a>
<h1 class="topictitle1">PV_RUNTIME_ATTSTATS</h1>
<div id="body0000001410351974"><p id="EN-US_TOPIC_0000001510283401__p1843084211614"><strong id="EN-US_TOPIC_0000001510283401__b74477416287">PV_RUNTIME_ATTSTATS</strong> displays table-level statistics in the memory generated by autoanalyze. The descriptions of the columns in <strong id="EN-US_TOPIC_0000001510283401__b1144714162814">PV_RUNTIME_RELSTATS</strong> are the same as those in <a href="dws_04_0754.html">PG_STATS</a>. This view is used only by clusters of version 8.2.0 or later.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001510283401__t2fb838a609734a73a66b82e9bb6c6c22" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PV_RUNTIME_ATTSTATS columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001510283401__r786ec905108b4753852b37fefe59fc07"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.5.1.1"><p id="EN-US_TOPIC_0000001510283401__ac46a7c9792314cbeb536d98a848a55cb">Column</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.2.5.1.2"><p id="EN-US_TOPIC_0000001510283401__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_0000001510283401__a375f91928065491589c6d10941d5cf90">Reference</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.2.2.5.1.4"><p id="EN-US_TOPIC_0000001510283401__aed5d5a4111504f02aac9e0892da76d68">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001510283401__r704e2fe0c29e4dc5a79d60753591229e"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__a1e605b46b1ef44139b034e8e203c869b">schemaname</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001510283401__aa5b23f34f2ca41589f472195b6322c09">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__af4cabbd2b3584df79d86db11a38b61ca"><a href="dws_04_0600.html">PG_NAMESPACE</a>.nspname</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__a62a43a5336f9457cbf1d64fbb17ae72b">Name of the schema that contains the table</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r79bb69b1c21a44caa7750d973a2f6231"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__a379e4948372a4d929a6246fd5a0cfe59">tablename</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001510283401__af670c602dcd84b12b3393ce62d912e7a">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__a5ea5c6966eef47528a09c262028ea514"><a href="dws_04_0578.html">PG_CLASS</a>.relname</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__afdad487debd34ee895a21fe3564de3af">Table name</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r3ff10e3c7fb84df9aae3579f23639c3c"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__aa7a3f77265124b8d8afa46e629ba34a7">attname</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001510283401__ac276fe23ef08425185e0b4802232d199">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__aec0919b0927044b48a6a9d8f8a41a702"><a href="dws_04_0573.html">PG_ATTRIBUTE</a>.attname</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__ad7d46ca622434854b7d7211994ffd20a">Column name</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__rb19633779ac1466ab60d7cb5dbc2945a"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__aaa7df26da29c4788ad183d7cb19049f6">inherited</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001510283401__a0228884b6475443ba63f6076ae13bc74"><span id="EN-US_TOPIC_0000001510283401__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_0000001510283401__a4cfcd0404855484087266a6b7cf9633d">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__ae8d5aefe761942c691a9b8bfb68f0e3c">If the value is <strong id="EN-US_TOPIC_0000001510283401__b4526164564015">true</strong>, the inherited subcolumns are included. If the value is <strong id="EN-US_TOPIC_0000001510283401__b6526184534011">false</strong>, only the columns in a specified table are included.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r41cfa753ace140b985f15ba1df5ec1bb"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__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_0000001510283401__aa1070a813895435f8d93a5eaa194fa76">real</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__a3c69392e348b44a88e73e7f65690c481">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__a21ec25727613475eb90f68175d951dda">Percentage of column entries that are null</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r5c27744bf9ad4bcebba17d6f370763af"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__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_0000001510283401__a341c07478d5444378b9246bbdbc39f46">integer</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__ab049578172024801b361d3befd78273d">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__abd5b7ce579f84077a3563c124c96f440">Average width in bytes of column's entries</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r1feb18465c6c416ea811bb985c4de684"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__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_0000001510283401__a63c161d771684306ab8e81da8c3ff85d">real</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__ae3c08b30fcdb4857bdf26dce2329ef8e">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><ul id="EN-US_TOPIC_0000001510283401__ue2784401b4794f52bcd5988597aa9246"><li id="EN-US_TOPIC_0000001510283401__l49d54702732e458e83399ee63c22ac5b">If the value is greater than 0, it indicates the estimated number of distinct values in the column.</li><li id="EN-US_TOPIC_0000001510283401__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_0000001510283401__a805271c4eed14862a10655580d779352">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_0000001510283401__af2c0a3af4dc441568767d7999b5b0fa1">The positive form is used when the column seems to have a fixed number of possible values. For example, <strong id="EN-US_TOPIC_0000001510283401__b77918616412">-1</strong> indicates a unique column in which the number of distinct values is the same as the number of rows.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r5bac768d13cf40bd88f51ccc7a778f46"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__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_0000001510283401__a770b8c06abb04e74b2945ff33e86075f">real</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__ac6bfed91290649c2bde78b6c064bbb1f">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__a994ac011bbb14e9398645cfaeb7c8094">Number of unique non-null data values in the <strong id="EN-US_TOPIC_0000001510283401__b685418154118">dn1</strong> column</p>
<ul id="EN-US_TOPIC_0000001510283401__u7bf2869968d04754822f7a41c9c5ae96"><li id="EN-US_TOPIC_0000001510283401__l1e65599868a14fa9a333e421b7d40e36">Exact number of distinct values if the value is greater than 0</li><li id="EN-US_TOPIC_0000001510283401__lda9cac08caa446b4a624cd0e9ffcf0c0">Negative of the number of distinct values divided by the number of rows if the value is less than 0 (For example, if the value of a column appears twice in average, set <strong id="EN-US_TOPIC_0000001510283401__b5293131614117">n_dndistinct=-0.5</strong>.)</li><li id="EN-US_TOPIC_0000001510283401__ld52045d6afea4b1da742ff77d6f839c5">The number of distinct values is unknown if the value is <strong id="EN-US_TOPIC_0000001510283401__b648211916412">0</strong>.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r15e25724c73a41bca2bd439a263f0586"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__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_0000001510283401__a4e18bc7133ec49ec988ac2a49f8d610b">anyarray</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__a0236ad1f110c44859f71e40c1713713a">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__a7c6a6b2d5f6a4ff29d1b4fae916617d9">List of the most common values in a column. If this combination does not have the most common values, it will be <strong id="EN-US_TOPIC_0000001510283401__b189516268414">NULL</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__rd5abc324e8e3459783af6995758b85f3"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__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_0000001510283401__a6f1f5d2832e34bb98e0b27fbc90309f9">real[]</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__a684e048068b44c2da70e3d12d085b40a">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__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_0000001510283401__b13863163315411">most_common_vals</strong> is <strong id="EN-US_TOPIC_0000001510283401__b18864733114113">NULL</strong>)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r1b6f860905fb4c22b8c438920210ed50"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__a3fd62a46c0514eb2bec840b9bd40873c">histogram_bounds</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001510283401__ae4d7fd197cb64e8e86e390f8477629ec">anyarray</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__ab8260ee29fb34873b06ae7106b2b6f71">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__a1c585d2b73fc457fbffa95473e5c5620">List of values that divide the column's values into groups of equal proportion. The values in <strong id="EN-US_TOPIC_0000001510283401__b1851363819416">most_common_vals</strong>, if present, are omitted from this histogram calculation. This field is null if the field data type does not have a <strong id="EN-US_TOPIC_0000001510283401__b39881341194113">&lt;</strong> operator or if the <strong id="EN-US_TOPIC_0000001510283401__b1798918416411">most_common_vals</strong> list accounts for the entire population.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__red56ac3d680f47bb8ebdc381d29561d3"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__a217ec0346d2c4599bbd137f56741a157">correlation</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001510283401__a8d90132eb7f34f188f31cf030ad9aa3e">real</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__ab4ccd9527d2a4554bfdf9073bccaddec">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__a7d35796e745345db9bd96827400bbadd">Statistical correlation between physical row ordering and logical ordering of the column values. It ranges from -1 to +1. When the value is near to -1 or +1, an index scan on the column is estimated to be cheaper than when it is near to zero, due to reduction of random access to the disk. This column is null if the column data type does not have a &lt; operator.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r57b47e79ab974c8b9896003ce8779f00"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__a5c59bd22c463423aa39ef2da8ef99186">most_common_elems</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001510283401__a5d3fb3de377345bcac16bdd6edae8d0e">anyarray</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__a4692aa7caad64fa885f8405defce490a">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__ad2942913973c494e98acf53962404338">A list of the most commonly used non-null element values</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r8862354fb74b4e94bb986bf38deece0f"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__a195586cb74d048e0ac80d4b642ba3b8f">most_common_elem_freqs</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001510283401__a68ae67d960134ce98662f1211e604d63">real[]</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__a7ad7c35505534df2964db5c3e9ef7c82">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__a8d41db215de5436aa8f6d1e06d70d769">A list of the frequencies of the most commonly used element values</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001510283401__r3c58a30c274b437fb0fe36a5759f19d2"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001510283401__a524f7d5538014ee6ab2d1c8d223ac813">elem_count_histogram</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001510283401__a706fe7ac6016486286c34d5b22403aed">real[]</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001510283401__a043370d5a67248d085e3cde3aaf5ade4">-</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001510283401__aa8cf6b4c70b14ed6a2a663e76d908409">A histogram of the counts of distinct non-null element values</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>