there is Postgres 9.6 on Redhat I want to EXPLAIN ANALYZE slow query (quite complex one) and it takes too much time. My session with EXPLAIN ANALYZE consume 100% of one CPU and doesn't finish even after 24 hours. How to analyze the issue if Postgres can't build an execution plan?

1 Answer 1


If you only want to look at the execution plan, run EXPLAIN without ANALYZE.

ANALYZE will cause the query to be executed, which provides much more useful data, but takes as long as the query runs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.