I'm trying to benchmark the query planning and parsing steps in PG:
- However, it seems that the query planner is using some sort of cache - only the first execution of
EXPLAIN ANALYZE
seems to report a high value in thePlanning time
section. Subsequently, it is less than 1ms. How do I turn this off? - The docs clearly state that the parsing time is not taken into account by
EXPLAIN ANALYZE
. Is there any other command/tool that will report the time it took to parse a query?
The Planning time shown by EXPLAIN ANALYZE is the time it took to generate the query plan from the parsed query and optimize it. It does not include parsing or rewriting.