Re: Planning performance problem (67626.278ms) - Mailing list pgsql-performance

From Pavel Stehule
Subject Re: Planning performance problem (67626.278ms)
Date
Msg-id CAFj8pRDDnOVNcU7dx4+oKH0x4-DsmL3XRWppQ8Cf5wwJ=G2fPg@mail.gmail.com
Whole thread Raw
In response to Planning performance problem (67626.278ms)  (Krzysztof Plocharz <plocharz@9livesdata.com>)
Responses Re: Planning performance problem (67626.278ms)
Re: Planning performance problem (67626.278ms)
List pgsql-performance


po 8. 4. 2019 v 16:11 odesílatel Krzysztof Plocharz <plocharz@9livesdata.com> napsal:
Hi

We have some very strange query planning problem. Long story short it
takes 67626.278ms just to plan. Query execution takes 12ms.

Query has 7 joins and 2 subselects.
It looks like the issue is not deterministic, sometimes is takes few ms
to plan the query.

One of the tables has 550,485,942 live tuples and 743,504,012 dead
tuples. Running ANALYZE on that tables solves the problem only temporarily.

Question is how can we debug what is going on?

please check your indexes against bloating. Planner get min and max from indexes and this operation is slow on bloat indexes.

but 67 sec is really slow - it can be some other other problem - it is real computer or virtual?

 

Best Regards,
Krzysztof Płocharz


pgsql-performance by date:

Previous
From: Krzysztof Plocharz
Date:
Subject: Re: Planning performance problem (67626.278ms)
Next
From: Justin Pryzby
Date:
Subject: Re: Planning performance problem (67626.278ms)