From: [Quipsy] Markus Karg <karg@quipsy.de>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: AW: WHERE column = X AND column = Y will always be zero matching rows
Date: Thu, 3 Aug 2023 14:53:36 +0000
Message-ID: <81214324c32a4e6586e40d22b007c05e@quipsy.de> (raw)
In-Reply-To: <CAKFQuwZb12ZQAio5wXE-FpF=0URHe8RWk5sa-SE7jZiBsypQJA@mail.gmail.com>
References: <1e15568107854a75ae8dd35a5a75daa7@quipsy.de>
<CAKFQuwZb12ZQAio5wXE-FpF=0URHe8RWk5sa-SE7jZiBsypQJA@mail.gmail.com>
David,
thank you for your opinion, so it is a chance for future optimization.
Whether or not this „should not happen“ is a different discussion. 😉
-Markus
Von: David G. Johnston <david.g.johnston@gmail.com>
Gesendet: Donnerstag, 3. August 2023 16:48
An: [Quipsy] Markus Karg <karg@quipsy.de>
Cc: pgsql-bugs@lists.postgresql.org
Betreff: Re: WHERE column = X AND column = Y will always be zero matching rows
On Thursday, August 3, 2023, [Quipsy] Markus Karg <karg@quipsy.de<mailto:karg@quipsy.de>> wrote:
EXPLAIN SELECT column FROM Table WHERE column = X AND column = Y
…says that PostgreSQL actually wants to perform a Scan!
I wonder why squandering any resources into a Scan here
Mostly because no one wants to volunteer to write code to deal with poorly written queries, nor, more technically, expend compute resources looking for situations that should not happen.
David J.
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-bugs@postgresql.org
Cc: karg@quipsy.de, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: AW: WHERE column = X AND column = Y will always be zero matching rows
In-Reply-To: <81214324c32a4e6586e40d22b007c05e@quipsy.de>
* 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