Re: subquery plan rows = 1, but it's merge joined instead of index lookup

From: Ilya Basin <basinilya(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: subquery plan rows = 1, but it's merge joined instead of index lookup
Date: 2024-04-11 14:47:52
Message-ID: 1e2744d1-49f2-4c76-bc10-d064f81a3982@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes! "set join_collapse_limit = 9" was enough to fix the plan, thanks Laurenz.
I will set both to 11.

-------- Original Message --------
From: Laurenz Albe [mailto:laurenz(dot)albe(at)cybertec(dot)at]
Sent: Thursday, April 11, 2024 at 14:21 UTC
To: ilya Basin; pgsql-general(at)lists(dot)postgresql(dot)org
Subject: subquery plan rows = 1, but it's merge joined instead of index lookup

On Thu, 2024-04-11 at 15:57 +0300, ilya Basin wrote:
Is there some complexity limit after which the planner starts acting dumb?

Yes, "join_collapse_limit" and "from_collapse_limit".
You can try increasing them.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-04-11 16:30:32 Re: Question on trigger
Previous Message veem v 2024-04-11 14:31:23 Question on trigger