Re: Is it possible to specify minimum number of rows planner should consider?

From: Timothy Garnett <tgarnett(at)panjiva(dot)com>
To: Matthew Bellew <matthewb(at)labkey(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Is it possible to specify minimum number of rows planner should consider?
Date: 2020-09-29 00:22:22
Message-ID: CAPcyiQ3qhVmk4Y8_rgJ9uUkzsajtNUTLcrt_qbpedHVQJRKeVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

That's a really straightforward patch that looks pretty safe, I may play
around with that a bit.

Thanks,
Tim

On Mon, Sep 28, 2020 at 5:45 PM Matthew Bellew <matthewb(at)labkey(dot)com> wrote:

> Here is a commit that accomplishes this with a configuration parameter.
>
>
> https://github.com/labkey-matthewb/postgres/commit/b1fd99f4deffbbf3db2172ccaba51a34f18d1b1a
>
> On Mon, Sep 28, 2020 at 2:07 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> Timothy Garnett <tgarnett(at)panjiva(dot)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
>>
>>
>>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message aditya desai 2020-09-30 07:13:50 Re: AWS RDS PostgreSQL CPU Spiking to 100%
Previous Message Matthew Bellew 2020-09-28 21:45:38 Re: Is it possible to specify minimum number of rows planner should consider?