doc-exports/docs/dws/dev/dws_04_0758.html
Lu, Huayi a24ca60074 DWS DEVELOPER 811 version
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>
2023-01-19 13:37:49 +00:00

178 lines
16 KiB
HTML

<a name="EN-US_TOPIC_0000001098815040"></a><a name="EN-US_TOPIC_0000001098815040"></a>
<h1 class="topictitle1">PG_STAT_ALL_TABLES</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001098815040__a030c07fc8681464590936a15b38520c0"><strong id="EN-US_TOPIC_0000001098815040__b172995521872">PG_STAT_ALL_TABLES</strong> displays access information about all rows in all tables (including TOAST tables) in the database.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001098815040__t7fc55659869240999167a09820dcc93a" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_STAT_ALL_TABLES columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001098815040__r04191422af0f45ae9cd898cde353fdd2"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001098815040__a8316e2201ae041a8b23e2a2aa21331a9"><strong id="EN-US_TOPIC_0000001098815040__b84235270691445">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001098815040__a6a438fa260f34557ad7e502493fe04f4">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001098815040__a054e3b8645074fe689ebac5dbcf7c790">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001098815040__r0cb0b016c4854b4781303d6f7a2056db"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__aa0123953dddb44bea4812ac3625f2e7b">relid</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a8d18880473674fbeb38f2992bf711bc7">oid</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__abb049c8c657c4fdf88e4b66d16db56a8">Table OID</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__reb2dd90c6c1c408498d201bdc27c300a"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a5529bad89ebe4724911d4ddfe7edad16">schemaname</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__af69901211a1243de934151a17ff8772a">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a1ab664d2c534489f90264ba69bc5b38b">Schema name of the table</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__rd8496014293e4c9eb7e32ccca7980606"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__ae8e3a70ae3e64e4da5aa80725d6168c6">relname</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a95b4d92fd9dd4ab6bdba3ca9b92071c3">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a8859a4d03ee0484aa7f81a8f0413a3cb">Name of the table</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r6177391ef8924adbbfaf63eea5cf82ec"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__ac2350e6faa4d401faaea245816074fdf">seq_scan</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__af84b1f5a7eef434aa5c83cb595f25837">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a716c5c8f9ce84b35ab59f1d7ccb2ca03">Number of sequential scans started on the table</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r1a4eb8ef4d1f4cc7b89eab025ed2193f"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__abd65de05cf6740a5a38fabcb9fc8e386">seq_tup_read</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a2e5f563a4c624554940823dde61e1ddc">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a1d63e7eea54045298b0a562169229b3a">Number of rows that have live data fetched by sequential scans</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__rcf023bc523a8462ca8e1a3f215e72d14"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a52fa5e5e94c14666a25b0a6898722344">idx_scan</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a69f592317e9d4fc1be29ea9261aec1b9">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__af1c98dd938924015919d809ef46601c0">Number of index scans</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r9d7ee88f4657458d856027c3925f0546"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__aaa660c249b814ae890363226a6533cc6">idx_tup_fetch</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a565f2e6e55f242cfaa3a97ff6b51335f">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__afd9046ee188943c5b395095bdbee6627">Number of rows that have live data fetched by index scans</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r90278b1e58414527a81e2c1605ed51fd"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a76849662483c4db3884fd88d002528ac">n_tup_ins</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a79d5a4d0abd546ba911c6d62ec0ab1f6">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a6dc6bf52b34e483f9f18d87830f02c46">Number of rows inserted</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r33ea7d7ccaaf4cd996d5afd71a88a1a4"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a1c3f8026681c47f5b77a857dfbc9cbe1">n_tup_upd</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a7ad0bdd097ca4b3eabacb4cd1d615a65">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a1c9d3d2eed8e4defa39089ecd0c475cc">Number of rows updated</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r5a5336630593403b9882241d3a8139c2"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__aaaa5f035f3784665bbd7ee994c6129ba">n_tup_del</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a4e421c855eec40d0be6c35831dd271cd">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a5c598838a8c84110beebad7d3a7b12a2">Number of rows deleted</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r30ace8ece4384c6eae92d0fccab8dc17"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a0beaf9fe844f43c7843a91599802d918">n_tup_hot_upd</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__ad2585b59c7b24d569a09011a5bf28ace">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a9494b621d5f54acba7e0956a3ce3c795">Number of rows updated by <strong id="EN-US_TOPIC_0000001098815040__b92221128153917">HOT</strong> (no separate index update is required)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r3e1f5bd058ea46f092786d94fb571c37"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__afc2515ee0ca04da39740fe086866e53a">n_live_tup</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a78d241015f8b485b97707292ee3a8233">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__ab48588db67084a249b52bf3119db102d">Estimated number of live rows</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__rc7de9cb7fa094b95bbd377bcee1af8c0"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a8393035ecc114607bbed429d1fae1d58">n_dead_tup</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a2b95f00aa22446c49b318d9fbdc3c751">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a0512213490af40269b79c7ea4a625f71">Estimated number of dead rows</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r56790946bc8f45fc907539cfaa3db583"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__af26a57190dba46019cc747fd9e3834fa">last_vacuum</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__ae7fedb4dd44e472c95ad89fd0a3c32df">timestamp with time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a62346dd0f06740999116ddbda66e05ab">Last time at which this table was manually vacuumed (excluding <strong id="EN-US_TOPIC_0000001098815040__b153110454392">VACUUM FULL</strong>)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r8ce3841d73fd4493acaa431e2e38d540"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a7652f1ba105a4370a0d2d2124eda68f5">last_autovacuum</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__aceaf988303444581a5088bf564f6ae7e">timestamp with time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a01bc0d609b5e42eeaa29b508052f2e75">Last time at which this table was automatically vacuumed</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r0a73942077544f9bbecc9fb735872f0f"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a5dfbd7c1084d48f28c5c4b865b56dbef">last_analyze</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a7f40ae9b0dd04d8eb6abdd664e0852b4">timestamp with time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__ab53ad1a3e3f24fbca5fe17d5589ee0cf">Last time at which this table was analyzed</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__rf35b6c9fafbb4ceb9cbe48e38444094c"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a52373bb7dd3249a88ceae705e1f294b1">last_autoanalyze</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__aef80a56651444d1196b166dd435a83b5">timestamp with time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__af86e1ac7533445f79480ec1cd9fbc163">Last time at which this table was automatically vacuumed</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r5a3bbd7ca0964d93b879c2d631a29895"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__ad57a98120f6c4b18849af4f8897bcc61">vacuum_count</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a0bbf36f2e3ed4c39964af3f7fb940040">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__aa0eaae577b274dbebf42f8a4feaaca50">Number of vacuum operations (excluding <strong id="EN-US_TOPIC_0000001098815040__b58527804020">VACUUM FULL</strong>)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r33b756d65ac046079ef34c768cc1e6e1"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__acd2b5d8d76284a9388ecd8450e48f56f">autovacuum_count</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a431a13aea121409792d3d9c91cc3961d">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a15c610940887428d891eb02eda9f3082">Number of autovacuum operations</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r7ad4dfd670f143799f9fe70a5c6d11ce"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a92084889dad342cabb7708a2873a47f1">analyze_count</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a753e28c6560d4cd6aa6af3d3e5b14bcc">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a7a739341e7774abcb8667801ce0b6950">Number of analyze operations</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__r27da610ab88c448e99f469985e261c46"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__a1c7408173235435a811673813ae44e8e">autoanalyze_count</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__a8196f9efe57a48fc9bca565d741baf0e">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__a07de9e1b39ca48b28e5bc5e921caf695">Number of autoanalyze operations</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098815040__row1486851718273"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001098815040__p89781636182115">last_data_changed</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001098815040__p3978183662114">timestamp with time zone</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001098815040__p497803611213">Last time at which this table was updated (by <strong id="EN-US_TOPIC_0000001098815040__b1517713336401">INSERT</strong>/<strong id="EN-US_TOPIC_0000001098815040__b11178153324010">UPDATE</strong>/<strong id="EN-US_TOPIC_0000001098815040__b2017819334404">DELETE</strong> or <strong id="EN-US_TOPIC_0000001098815040__b111781233114020">EXCHANGE</strong>/<strong id="EN-US_TOPIC_0000001098815040__b1517916337401">TRUNCATE</strong>/<strong id="EN-US_TOPIC_0000001098815040__b1617913374020">DROP</strong> <em id="EN-US_TOPIC_0000001098815040__i817919337409">partition</em>). This column is recorded only on the local CN.</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>