log_planner_stats and prepared statements - Mailing list pgsql-hackers

From Bruce Momjian
Subject log_planner_stats and prepared statements
Date
Msg-id 20190417033307.gfyducmgzx6gz7wn@momjian.us
Whole thread Raw
Responses Re: log_planner_stats and prepared statements
List pgsql-hackers
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  <bruce@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 +



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Runtime pruning problem
Next
From: Tom Lane
Date:
Subject: Re: Runtime pruning problem