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

81 lines
7.2 KiB
HTML

<a name="EN-US_TOPIC_0000001145494641"></a><a name="EN-US_TOPIC_0000001145494641"></a>
<h1 class="topictitle1">PG_STAT_ALL_INDEXES</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001145494641__en-us_topic_0059777984_p152179511731"><strong id="EN-US_TOPIC_0000001145494641__b84235270614150">PG_STAT_ALL_INDEXES</strong> displays access informaton about all indexes in the database, with information about each index displayed in a row.</p>
<p id="EN-US_TOPIC_0000001145494641__a9a322a449b3b45afa7dcb3bb8c8ee632">Indexes can be used via either simple index scans or "bitmap" index scans. In a bitmap scan the output of several indexes can be combined via AND or OR rules, so it is difficult to associate individual heap row fetches with specific indexes when a bitmap scan is used. Therefore, a bitmap scan increments the <strong id="EN-US_TOPIC_0000001145494641__b84235270614548">pg_stat_all_indexes.idx_tup_read</strong> count(s) for the index(es) it uses, and it increments the <strong id="EN-US_TOPIC_0000001145494641__b8423527061463">pg_stat_all_tables.idx_tup_fetch</strong> count for the table, but it does not affect <strong id="EN-US_TOPIC_0000001145494641__b84235270614631">pg_stat_all_indexes.idx_tup_fetch</strong>.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001145494641__tf0c107fbbb304b138700e88d167af088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PG_STAT_ALL_INDEXES columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001145494641__rc5fb574330ac415ba94094cc2b68307c"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.4.1.1"><p id="EN-US_TOPIC_0000001145494641__a175d3374338b47e9beac79a61fdddae3"><strong id="EN-US_TOPIC_0000001145494641__b84235270691445">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.4.1.2"><p id="EN-US_TOPIC_0000001145494641__af3cd05cab452402e9ffecf97cd6170a6">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.3.2.4.1.3"><p id="EN-US_TOPIC_0000001145494641__aecfd59a8aa6a453da9e993e8306736be">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001145494641__racb44eeae0e44ea3b9447b95df74d07e"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494641__a632b6424ad4f4ea0a136628c3a269a25">relid</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494641__a32f10615a1d14756b9bb66b9e85ff14c">oid</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494641__a951a8015e7474dafb928a41771d329e4">OID of the table for this index</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494641__r286421a7b1cb44afb5350d029aeaca2e"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494641__abc4d5b4e326940a38e0785a9f539e2ac">indexrelid</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494641__a392ebc5433c34aa78327d04a1f9263ea">oid</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494641__a2543d63408dc410cb1785f71f66fb88d">OID of this index </p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494641__r2f5baf75db224ed29c4fc6ebbe66f842"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494641__a1252cff6e9d74dd7aa14b317b2df9fd8">schemaname</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494641__afac369cbe6ac438388372dbf65bc98d7">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494641__aebdecc17d8e84b8599ebea81d3a795c8">Name of the schema this index is in </p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494641__red286d78db054bf9bb21d0a08907d169"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494641__af3ce569f7a6543fea62a405677145a2e">relname</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494641__a71ab1cd4c6b54918bc965a2c6070a240">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494641__a6077bd7013b24c31868a0c7ba4478865">Name of the table for this index</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494641__r56102d77771142b9bfbfe340b81da708"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494641__a4a6b58a44c354cbfa9c64a5e9266ca49">indexrelname</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494641__a103e32f1732448568dbc69426dd26836">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494641__ae19d06702be3422a8e1283a954a62885">Name of this index</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494641__re757e12805cc4a30aafc0216a0ea24e6"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494641__adb410240993e482a92bd77bbcd9ca2e3">idx_scan</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494641__ac8072d2185ec426ab04729fb471ee1a2">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494641__a0c73099c789c456fa880aa66dd9c62e4">Number of index scans initiated on this index</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494641__r971b085b0c9b4aa4a3e7c5f6c9ab8c50"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494641__a7b8120222c814b2685851c06c274cc3f">idx_tup_read</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494641__a09a0345f47cd4e09bd01b113cfd85341">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494641__a6274bba819fd4c5c89ca67360ff33fb0">Number of index entries returned by scans on this index</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145494641__r0824205d014749ed8218889d1fd0eeba"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001145494641__afcb576e67001494caf28122270a17ee5">idx_tup_fetch</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001145494641__ab8f503bafc104c3fbb5fb06559e21998">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001145494641__afebbc6856b3749a7afee997982dd9db2">Number of live table rows fetched by simple index scans using this index </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>