Add note in pg_stat_statements documentation about planning statistics.
authorFujii Masao
Thu, 9 Apr 2020 03:56:36 +0000 (12:56 +0900)
committerFujii Masao
Thu, 9 Apr 2020 03:56:36 +0000 (12:56 +0900)
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[email protected]

doc/src/sgml/pgstatstatements.sgml

index 3d2610864972b5de11e6f88967c9b3cf0f32b28f..5a962feb39d6be00111eccc5c4a8356559c0ed4a 100644 (file)
       calls
       bigint
       
-      Number of times executed
+      Number of times the statement was executed
      
 
      
    reducing pg_stat_statements.max to prevent
    recurrences.
   
+
+  
+   plans and calls 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.
+