Planning time is the elapsed time PostgreSQL spends choosing an execution plan for a query. EXPLAIN ANALYZE reports it separately from execution time; together, they form the query's total measured time. section 4.4
Measure planning time with EXPLAIN ANALYZE
Run EXPLAIN ANALYZE on an indexed lookup. The plan reports an Index Scan, Planning Time of 0.119 ms, and Execution Time of 0.077 ms. Repeat the query until the measurements become consistent because initial executions may be slower.
