Re: Is it possible to specify minimum number of rows planner should consider? - Mailing list pgsql-performance

From Matthew Bellew
Subject Re: Is it possible to specify minimum number of rows planner should consider?
Date
Msg-id CAJnjrPP6dQEMFNJoykgXMF1K=4+OXoE3-MYNs8QpPMocxVi2vw@mail.gmail.com
Whole thread Raw
In response to Re: Is it possible to specify minimum number of rows planner should consider?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Is it possible to specify minimum number of rows planner should consider?  (Timothy Garnett <tgarnett@panjiva.com>)
List pgsql-performance
Here is a commit that accomplishes this with a configuration parameter.


On Mon, Sep 28, 2020 at 2:07 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Timothy Garnett <tgarnett@panjiva.com> writes:
> Is there some way to tell the planner that unless it's guaranteed by a
> constraint or some such it shouldn't guess that the selectivity of a
> filter/anti-join is 1 row (e.g. minimum to consider is 2 rows unless it's
> guaranteed to be 1 row) or somehow otherwise make it more conservative
> around the worst case possibilities.

There's been some discussion in that area, but it's a hard problem
to solve in general, and especially so if you'd like to not break
a ton of queries that work nicely today.

                        regards, tom lane


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is it possible to specify minimum number of rows planner should consider?
Next
From: Timothy Garnett
Date:
Subject: Re: Is it possible to specify minimum number of rows planner should consider?