pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Timothy Garnett <tgarnett@panjiva.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Is it possible to specify minimum number of rows planner should consider?
Date: Mon, 28 Sep 2020 17:06:51 -0400
Message-ID: <408272.1601327211@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPcyiQ2Nbw+caY0y+Gywf+58dmVkpuqPSqJuDLcoL90DbnwA7w@mail.gmail.com>
References: <CAPcyiQ2Nbw+caY0y+Gywf+58dmVkpuqPSqJuDLcoL90DbnwA7w@mail.gmail.com>

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





view thread (4+ messages)  latest in thread

Message-ID: <408272.1601327211@sss.pgh.pa.us>
Permalink:  ../408272.1601327211@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/408272.1601327211@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tgarnett@panjiva.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Is it possible to specify minimum number of rows planner should consider?
  In-Reply-To: <408272.1601327211@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox