Files
doc-exports/docs/dws/dev/dws_04_0757.html
luhuayi 177cd61a57 DWS DEVG 910.211 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: luhuayi <luhuayi@huawei.com>
Co-committed-by: luhuayi <luhuayi@huawei.com>
2025-05-05 07:44:03 +00:00

81 lines
7.1 KiB
HTML

<a name="EN-US_TOPIC_0000001764491504"></a><a name="EN-US_TOPIC_0000001764491504"></a>
<h1 class="topictitle1">PG_STAT_ALL_INDEXES</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001764491504__en-us_topic_0059777984_p152179511731"><strong id="EN-US_TOPIC_0000001764491504__b67394976331931">PG_STAT_ALL_INDEXES</strong> displays statistics about all accesses to a specific index in the current database.</p>
<p id="EN-US_TOPIC_0000001764491504__adb82cd5859d74b40a8a23370f8831316">Indexes can be used via either simple index scans or "bitmap" index scans. Bitmap scans can combine the output of multiple indexes using AND or OR rules, but combining independent row fetching with specific indexes is challenging. Consequently, a bitmap scan increases the index count in <strong id="EN-US_TOPIC_0000001764491504__b1453145033912">pg_stat_all_indexes.idx_tup_read</strong> and the table count in <strong id="EN-US_TOPIC_0000001764491504__b17532195053914">pg_stat_all_tables.idx_tup_fetch</strong>, while having no effect on <strong id="EN-US_TOPIC_0000001764491504__b6532115013398">pg_stat_all_indexes.idx_tup_fetch</strong>.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001764491504__t91f720303e1746f391aea43016aa8d88" 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_0000001764491504__r32eacee3840a4cebb017e6ae1fe5b64f"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.4.1.1"><p id="EN-US_TOPIC_0000001764491504__a47eb11b0fda344d1b04458855b4e583f"><strong id="EN-US_TOPIC_0000001764491504__b198745282143714">Column</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_0000001764491504__a27f621b61e7046da9cbcc1299dc12cd3">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_0000001764491504__ab8e4efff10544efca02d7dd025eba205">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001764491504__rbfe69f9edeec4ba88b00e0bdfb1fe21f"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491504__af2747c19f7444b11bba182cb58cf2c3c">relid</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001764491504__a999214220a3f418ab2b04575af92cae1">OID</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491504__ad74038f668ab4ae1a291cc2daff8af62">OID of the table for this index.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001764491504__rfe46194466b84fc081532ed3f05abe8d"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491504__aaad73a2cd31b48898113328daff0c930">indexrelid</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001764491504__ad1e3620ff02b434bb726feb9e5251faa">OID</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491504__a67728e71198947e1aed10099639b7183">OID of this index.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001764491504__rb7ec9f4d6ec04c02b55471e76da93736"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491504__a726da0deadd04a6b966fa43e0e9ce81d">schemaname</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001764491504__a4ca561324aad42a89aae1703d1d92fa2">Name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491504__aba293b28acab4df3bd341afeb33151f2">Name of the schema this index is in. </p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001764491504__r4d6f68fc446a4c92ac26a4d5d299fda7"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491504__a47a8d87f8faa44d792ae7efa74514cae">relname</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001764491504__abbc92441450f4ead8c7f1e9c4e339676">Name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491504__a5f036081f5ed4b4d9f59fbe4108016ec">Name of the table for this index.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001764491504__r6d8a4ef5c3ec483f9622d2ca7bb258b0"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491504__a1de02717e9c14137b2488fc10319e9f2">indexrelname</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001764491504__ab80d887a97f144d08842dd8b50f85767">Name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491504__a70dc58cc48cd4bcdb394f1512c72e4f0">Name of this index.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001764491504__r1f4feea62f224d7ebfe2651cab6b69ac"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491504__a49c484eda6f4479581cfd9188d97ba06">idx_scan</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001764491504__a954aca6426cc4529a4af4ee5d14f416d">Bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491504__accfa998e6af348a8b28274db19c03f7b">Number of index scans initiated on this index.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001764491504__r1f83980b322c42bfb920e6804d80a758"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491504__a82d33e7aaa494caba3cc1a24cac49b93">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_0000001764491504__aefd6fad6956b4b10b5e257bfd1c4198b">Bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491504__a7c4f4f704b854582b3f58759546c809c">Number of index entries returned by scans on this index.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001764491504__rdc886cdfb7574d0f8d57f9d0f54612f9"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001764491504__af17a10e5a65447b0b455ea76ab769203">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_0000001764491504__ae9901fdb851b467dbe4f50ce24b543ed">Bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001764491504__af05f6185c3f344c38398a8d4e365e1a8">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>