aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/monitoring.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/monitoring.sgml')
-rw-r--r--doc/src/sgml/monitoring.sgml28
1 files changed, 22 insertions, 6 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index b1710680705..aaa6586d3a4 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -4234,16 +4234,32 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<note>
<para>
- Queries that use certain <acronym>SQL</acronym> constructs to search for
- rows matching any value out of a list or array of multiple scalar values
- (see <xref linkend="functions-comparisons"/>) perform multiple
- <quote>primitive</quote> index scans (up to one primitive scan per scalar
- value) during query execution. Each internal primitive index scan
- increments <structname>pg_stat_all_indexes</structname>.<structfield>idx_scan</structfield>,
+ Index scans may sometimes perform multiple index searches per execution.
+ Each index search increments <structname>pg_stat_all_indexes</structname>.<structfield>idx_scan</structfield>,
so it's possible for the count of index scans to significantly exceed the
total number of index scan executor node executions.
</para>
+ <para>
+ This can happen with queries that use certain <acronym>SQL</acronym>
+ constructs to search for rows matching any value out of a list or array of
+ multiple scalar values (see <xref linkend="functions-comparisons"/>). It
+ can also happen to queries with a
+ <literal><replaceable>column_name</replaceable> =
+ <replaceable>value1</replaceable> OR
+ <replaceable>column_name</replaceable> =
+ <replaceable>value2</replaceable> ...</literal> construct, though only
+ when the optimizer transforms the construct into an equivalent
+ multi-valued array representation.
+ </para>
</note>
+ <tip>
+ <para>
+ <command>EXPLAIN ANALYZE</command> outputs the total number of index
+ searches performed by each index scan node. See
+ <xref linkend="using-explain-analyze"/> for an example demonstrating how
+ this works.
+ </para>
+ </tip>
</sect2>