Postgres EXPLAIN ANALYZE may be lying to you
The execution time as reported by EXPLAIN ANALYZE is substantially higher than that of the real query execution time.
Turn out the measurement overhead added by EXPLAIN ANALYZE can be significant, especially on machines with slow gettimeofday() operating-system calls. So on system use KVM where click is as fast as hypervisor’s, the EXPLAIN ANALYZE looks faster than one from XEN which uses virtualized clock for VMs.
Appears in lists (1)
More like this (3)
What’s New in the Citus 9.4 Extension to Postgres — Citus transforms Postgres into a distributed...What’s New in the Citus 9.4 Extension to Postgres — Citus transforms Postgres into a distributed database, distributing your data and your SQL queries across multiple nodes. v9.4 improves EXPLAIN ANALYZE, has some performance and safety improvements, and can now calculate percentiles at scale using the t-digest extension.
Reading a Postgres EXPLAIN ANALYZE Query Plan The most powerful tool at our disposal for understanding...Reading a Postgres EXPLAIN ANALYZE Query Plan The most powerful tool at our disposal for understanding and optimizing SQL queries is EXPLAIN ANALYZE, which is a Postgres command that accepts a statement such as SELECT …, UPDATE …, or DELETE …, executes the statement, and instead of returning the data provides a query plan detailing what approach the planner took to executing the statement provided.