From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | log_planner_stats and prepared statements |
Date: | 2019-04-17 03:33:07 |
Message-ID: | 20190417033307.gfyducmgzx6gz7wn@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)momjian(dot)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 +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-04-17 03:54:01 | Re: Runtime pruning problem |
Previous Message | Amit Langote | 2019-04-17 02:49:04 | Re: Runtime pruning problem |