Waiting for 9.4 – Include planning time in EXPLAIN ANALYZE output.

Include planning time in EXPLAIN ANALYZE output.
This doesn't work for prepared queries, but it's not too easy to get
the information in that case and there's some debate as to exactly
what the right thing to measure is, so just do this for now.
Andreas Karlsson, with slight doc changes by me.

Planning is the part of query processing that happens before PostgreSQL will even touch data. It is actually what creates the plans that EXPLAIN ANALYZE shows.

For trivial queries – it's fast. For more complicated queries – it can be longer.

Now, with this new patch from Andreas, we can actually see the planning time.

Now we see that for this particular query, 0.1ms is used to plan it. Unfortunately, I don't have any real databases on 9.4, so I can't show you longer times, but generally – the more joins/subselects – the longer it will take to plan the query.