Re: bt Scankey in another contradictory case

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: b ro <bigbro_wq(at)hotmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: bt Scankey in another contradictory case
Date: 2024-10-07 16:05:53
Message-ID: CAH2-WzkdWLNk_aear3rFXCnp+-DGzwCXFNtF_xri2+NH_DX_CQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 30, 2024 at 10:32 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> It doesn't make a huge difference in practice, because we'll still end
> the scan once the leaf level is reached. But it matters more when
> array keys are involved, where there might be more than one descent to
> the leaf level. Plus we might as well just be thorough about this
> stuff.

Was your "explain (analyze, buffers) select * from c_s where x >4000
and y >10 and y <10 order by x desc" example intended to illustrate
that these earlier remarks of mine about the problem not being so bad
aren't always correct? With your patch, we can detect contradictory quals
regardless of their required-ness. There will be some cases where (with your
patch) we'll now avoid a very inefficient full index scan -- contrary to what I
said about it back on August 30.

If that is what you meant, then I accept your argument. I didn't quite
get your point before, but this is a logical, useful argument. (You
didn't really need to convince me, but this argument still helps your
patch.)

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2024-10-07 16:12:04 Re: POC, WIP: OR-clause support for indexes
Previous Message Laurenz Albe 2024-10-07 16:02:35 Re: On disable_cost