I just figured this out. Someone had set the default_statistics_target to
5000 instead of 500 I think. I changed it to 500, ran analyze and
planning time is much better. In case someone runs into this problem,
sending this out here. Thank you all.
On Wed, Apr 6, 2022 at 7:57 PM Tom Lane wrot
"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:
>> Planning Time: 578.068 ms
>> Execution Time: 0.113 ms
> The fundamental issue
I added the additional where clauses to remove needing to join multiple
columns which I guess didn't really help. This is the original query:
*SELECT* rr.* *FROM* rpc rpc
*INNER* *JOIN rr* rr
*ON* rr.uuid = rpc.rr_id
On Wed, Apr 6, 2022 at 5:27 PM Saurabh Sehgal wrote:
>
> 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* *
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:
>
> *explain* (*analyze*, costs, t
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