AW: WHERE column = X AND column = Y will always be zero matching rows

From: "[Quipsy] Markus Karg" <karg(at)quipsy(dot)de>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: AW: WHERE column = X AND column = Y will always be zero matching rows
Date: 2023-08-03 14:53:36
Message-ID: 81214324c32a4e6586e40d22b007c05e@quipsy.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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(dot)g(dot)johnston(at)gmail(dot)com>
Gesendet: Donnerstag, 3. August 2023 16:48
An: [Quipsy] Markus Karg <karg(at)quipsy(dot)de>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Betreff: Re: WHERE column = X AND column = Y will always be zero matching rows

On Thursday, August 3, 2023, [Quipsy] Markus Karg <karg(at)quipsy(dot)de<mailto:karg(at)quipsy(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2023-08-03 15:02:11 Re: WHERE column = X AND column = Y will always be zero matching rows
Previous Message Laurenz Albe 2023-08-03 14:53:13 Re: WHERE column = X AND column = Y will always be zero matching rows