Slow Planning Times

2022-04-06 Thread Saurabh Sehgal
I have the following query: *explain* (*analyze*, costs, timing) *SELECT* rr.* *FROM* rpc rpc *INNER* *JOIN* rr rr *ON* rr.uuid = rpc.rr_id *INNER* *JOIN* rs rs *ON* rs.r_id = rpc.r_id

Re: Slow Planning Times

2022-04-06 Thread Saurabh Sehgal
To clarify - I have run "vaccum full" and "vacuum analyze" on every single table involved in the query and the planning times are still around the same and were not impacted. On Wed, Apr 6, 2022 at 5:26 PM Saurabh Sehgal wrote: > > I have the following query: > &

Re: Slow Planning Times

2022-04-06 Thread Saurabh Sehgal
chooses a crappy generic plan that runs slow. If I don't user prepared statement, the plan is efficient but the planning time is slow. I'll try the join_collapse_limit advice and see if that helps. Thank you! On Wed, Apr 6, 2022 at 5:54 PM David G. Johnston wrote: > On Wed, Apr 6,

Re: Slow Planning Times

2022-04-06 Thread Saurabh Sehgal
wrote: > "David G. Johnston" writes: > > On Wed, Apr 6, 2022 at 5:27 PM Saurabh Sehgal > wrote: > >> I have the following query: > >> I don't think it is super complex. But when I run explain analyze on > this > >> I get the following: >