From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Praneel Devisetty <devisettypraneel(at)gmail(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Planner choosing nested loop in place of Hashjoin |
Date: | 2023-03-11 22:13:59 |
Message-ID: | CAMkU=1zO8ViSHjQgE=VhrxVL2rqvCrccOvBu2DQZ3BYZJ1ZqUg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Tue, Mar 7, 2023 at 7:14 AM Praneel Devisetty <devisettypraneel(at)gmail(dot)com>
wrote:
> Hi,
>
> I have a query which is taking roughly 10mins to complete and the query
> planner is choosing a nested loop.
>
> query and query plan with analyze,verbose,buffers
> qsEn | explain.depesz.com <https://explain.depesz.com/s/qsEn#html>
>
>
What version is this? Any chance you can share this without
anonymization? Not knowing the actual names makes it a lot harder to
understand. In particular, what is the actual function golf_romeo()? And
five_two()? And what is the regexp pattern that is bastardized into
'oscar_mike'::text ?
> Disabling the nested loop on session is allowing the query planner to
> choose a better plan and complete it in 2mins.Stats are up to date and
> analyze was performed a few hours ago.
>
A lot can change in a few hours, do another analyze immediately before
gathering the execution plan. Your row estimates are dreadful, but we
can't really tell why with the info provided.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | James Robertson | 2023-03-12 17:59:32 | multicolumn partitioning help |
Previous Message | André Rodrigues | 2023-03-11 11:47:46 | Huge Tables |