Re: BUG #17618: unnecessary filter column <> text even after adding index

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, sindysenorita(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17618: unnecessary filter column <> text even after adding index
Date: 2022-11-02 07:46:30
Message-ID: CAMbWs49oBk4EfHC+44xkuAwQYnGH5pyKP40=FwZv9Zecx9=3Mg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Sep 26, 2022 at 7:42 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:

> On Sat, Sep 24, 2022 at 8:41 AM Richard Guo <guofenglinux(at)gmail(dot)com>
> wrote:
>
>> Yeah, I agree that running eval_const_expressions here is expensive.
>> Maybe we can just do the reverse transformation in
>> create_bitmap_scan_plan against what we do for boolean index in
>> match_boolean_index_clause?
>>
>
> Following this idea, I come up with v2 patch. Is this the right
> direction to go?
>

Update with v3 patch, nothing changes except fixes a test failure
spotted by cfbot.

Thanks
Richard

Attachment Content-Type Size
v3-0001-constant-folding-for-indexquals-in-bitmap-scan.patch application/octet-stream 5.0 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mike Burgener 2022-11-02 08:00:49 AW: BUG #17672: Wrong logic of Postgresql Resporitory Naming and mirroring incompatibility
Previous Message Amit Kapila 2022-11-02 07:43:02 Re: BUG #17670: Logical Replication data may be lost on the subscription under certain scenarios