Re: [HACKERS] path toward faster partition pruning - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] path toward faster partition pruning
Date
Msg-id 31546.1522814413@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] path toward faster partition pruning  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: [HACKERS] path toward faster partition pruning  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> It's true that the const simplification code will generally rewrite
> most NOT(clause) to use the negator operator, but if the operator does
> not have a negator it can't do this.
> ...
> At the moment pruning does not work for this case at all. Perhaps it should?

It's hard to see why we'd expend extra effort to optimize such situations.
The right answer would invariably be to fix the inadequate operator
definition, because missing the negator link would hobble many other
cases besides this.

Now if you can show a case where the extra smarts would be useful
without presuming a badly-written opclass, it's a different matter.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Comment update in BuildTupleFromCStrings()
Next
From: David Rowley
Date:
Subject: Re: [HACKERS] path toward faster partition pruning