5

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?

asked Dec 13, 2019 at 13:56

1 Answer 1

12

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.

answered Dec 13, 2019 at 14:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.