diff options
author | Fujii Masao <fujii@postgresql.org> | 2020-04-09 12:56:36 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2020-04-09 12:56:36 +0900 |
commit | 58ad961f19f7eca26e6d60eb07adcffeafd0082e (patch) | |
tree | b9f0ef0350609cf99a333fbe7615fe95c3106bab | |
parent | c3e4cbaab936a17b579d85c5ff28bcb2251736d0 (diff) | |
download | postgresql-58ad961f19f7eca26e6d60eb07adcffeafd0082e.tar.gz postgresql-58ad961f19f7eca26e6d60eb07adcffeafd0082e.zip |
Add note in pg_stat_statements documentation about planning statistics.
The added note explains that the numbers of planning and execution in
the statement are not always expected to match because their statistics are
updated at their respective end phase, and only for successful operations.
Author: Pascal Legrand, Julien Rouhaud, tweaked a bit by Fujii Masao
Discussion: https://postgr.es/m/1585857868967-0.post@n3.nabble.com
-rw-r--r-- | doc/src/sgml/pgstatstatements.sgml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml index 3d261086497..5a962feb39d 100644 --- a/doc/src/sgml/pgstatstatements.sgml +++ b/doc/src/sgml/pgstatstatements.sgml @@ -129,7 +129,7 @@ <entry><structfield>calls</structfield></entry> <entry><type>bigint</type></entry> <entry></entry> - <entry>Number of times executed</entry> + <entry>Number of times the statement was executed</entry> </row> <row> @@ -398,6 +398,16 @@ reducing <varname>pg_stat_statements.max</varname> to prevent recurrences. </para> + + <para> + <structfield>plans</structfield> and <structfield>calls</structfield> aren't + always expected to match because planning and execution statistics are + updated at their respective end phase, and only for successful operations. + For example, if a statement is successfully planned but fails during + the execution phase, only its planning statistics will be updated. + If planning is skipped because a cached plan is used, only its execution + statistics will be updated. + </para> </sect2> <sect2> |