HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlModerate

Postgres EXPLAIN ANALYZE is super slow

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
analyzepostgressuperslowexplain

Problem

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?

Solution

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.

Context

StackExchange Database Administrators Q#255582, answer score: 11

Revisions (0)

No revisions yet.