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>
81 lines
7.1 KiB
HTML
81 lines
7.1 KiB
HTML
<a name="EN-US_TOPIC_0000001233563273"></a><a name="EN-US_TOPIC_0000001233563273"></a>
|
|
|
|
<h1 class="topictitle1">PG_STAT_ALL_INDEXES</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001233563273__en-us_topic_0059777984_p152179511731"><strong id="EN-US_TOPIC_0000001233563273__b14174111133814">PG_STAT_ALL_INDEXES</strong> displays statistics about all accesses to a specific index in the current database.</p>
|
|
<p id="EN-US_TOPIC_0000001233563273__adb82cd5859d74b40a8a23370f8831316">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_0000001233563273__b102290509841242">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_0000001233563273__b81302158741242">pg_stat_all_tables.idx_tup_fetch</strong> count for the table, but it does not affect <strong id="EN-US_TOPIC_0000001233563273__b2386256441242">pg_stat_all_indexes.idx_tup_fetch</strong>.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001233563273__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_0000001233563273__r32eacee3840a4cebb017e6ae1fe5b64f"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.4.1.1"><p id="EN-US_TOPIC_0000001233563273__a47eb11b0fda344d1b04458855b4e583f"><strong id="EN-US_TOPIC_0000001233563273__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_0000001233563273__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_0000001233563273__ab8e4efff10544efca02d7dd025eba205">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001233563273__rbfe69f9edeec4ba88b00e0bdfb1fe21f"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001233563273__af2747c19f7444b11bba182cb58cf2c3c">relid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001233563273__a999214220a3f418ab2b04575af92cae1">oid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001233563273__ad74038f668ab4ae1a291cc2daff8af62">OID of the table for this index</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233563273__rfe46194466b84fc081532ed3f05abe8d"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001233563273__aaad73a2cd31b48898113328daff0c930">indexrelid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001233563273__ad1e3620ff02b434bb726feb9e5251faa">oid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001233563273__a67728e71198947e1aed10099639b7183">OID of this index </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233563273__rb7ec9f4d6ec04c02b55471e76da93736"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001233563273__a726da0deadd04a6b966fa43e0e9ce81d">schemaname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001233563273__a4ca561324aad42a89aae1703d1d92fa2">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001233563273__aba293b28acab4df3bd341afeb33151f2">Name of the schema this index is in</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233563273__r4d6f68fc446a4c92ac26a4d5d299fda7"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001233563273__a47a8d87f8faa44d792ae7efa74514cae">relname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001233563273__abbc92441450f4ead8c7f1e9c4e339676">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001233563273__a5f036081f5ed4b4d9f59fbe4108016ec">Name of the table for this index</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233563273__r6d8a4ef5c3ec483f9622d2ca7bb258b0"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001233563273__a1de02717e9c14137b2488fc10319e9f2">indexrelname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001233563273__ab80d887a97f144d08842dd8b50f85767">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001233563273__a70dc58cc48cd4bcdb394f1512c72e4f0">Name of this index</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233563273__r1f4feea62f224d7ebfe2651cab6b69ac"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001233563273__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_0000001233563273__a954aca6426cc4529a4af4ee5d14f416d">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001233563273__accfa998e6af348a8b28274db19c03f7b">Number of index scans initiated on this index</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233563273__r1f83980b322c42bfb920e6804d80a758"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001233563273__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_0000001233563273__aefd6fad6956b4b10b5e257bfd1c4198b">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001233563273__a7c4f4f704b854582b3f58759546c809c">Number of index entries returned by scans on this index</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001233563273__rdc886cdfb7574d0f8d57f9d0f54612f9"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001233563273__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_0000001233563273__ae9901fdb851b467dbe4f50ce24b543ed">bigint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001233563273__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>
|
|
|