I have found that log_planner_stats only outputs stats until the generic
plan is chosen.  For example, if you run the following commands:

        SET client_min_messages = 'log';
        SET log_planner_stats = TRUE;
        
        PREPARE e AS SELECT relkind FROM pg_class WHERE relname = $1 ORDER BY 1;

        EXPLAIN ANALYZE VERBOSE EXECUTE e ('pg_class');
        EXPLAIN ANALYZE VERBOSE EXECUTE e ('pg_class');
        EXPLAIN ANALYZE VERBOSE EXECUTE e ('pg_class');
        EXPLAIN ANALYZE VERBOSE EXECUTE e ('pg_class');
        EXPLAIN ANALYZE VERBOSE EXECUTE e ('pg_class');
        EXPLAIN ANALYZE VERBOSE EXECUTE e ('pg_class');
-->     EXPLAIN ANALYZE VERBOSE EXECUTE e ('pg_class');

The last explain will _not_ show any log_planner_stats duration, though
it does show an EXPLAIN planning time:

         Planning Time: 0.012 ms

It this expected behavior?

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


Reply via email to