Re: BUG #17618: unnecessary filter column <> text even after adding index
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>, sindysenorita@gmail.com,
pgsql-bugs@lists.postgresql.org
Date: 2022-11-05T17:07:44Z
Lists: pgsql-bugs
Richard Guo <guofenglinux@gmail.com> writes: > Update with v3 patch, nothing changes except fixes a test failure > spotted by cfbot. I think this is pretty close to usable, except that I don't believe reusing simplify_boolean_equality this way is a great idea. It does more than we need (surely the LHS-is-Const case cannot occur here) and it has assumptions that I'm not sure hold --- particularly the bit about !constisnull. I'd be inclined to just copy-and-paste the three or four lines we need. regards, tom lane
Commits
-
Produce more-optimal plans for bitmap scans on boolean columns.
- 042c9091f0fc 16.0 landed