Re: another optimizer question - Mailing list pgsql-hackers

From Tom Lane
Subject Re: another optimizer question
Date
Msg-id 11691.1019140286@sss.pgh.pa.us
Whole thread Raw
In response to another optimizer question  (Jakub Ouhrabka <jouh8664@ss1000.ms.mff.cuni.cz>)
List pgsql-hackers
Jakub Ouhrabka <jouh8664@ss1000.ms.mff.cuni.cz> writes:
> can anyone explain me why there are different query plans for "select ...
> from ... where y!=x"  and "select ... from ... where y<x or y>x" for
> integers, please?

!= isn't an indexable operation.  This is not the planner's fault, but
a consequence of the index opclass design we inherited from Berkeley.
I suppose we could make it an indexable operation --- but there are so
few cases where it'd be a win that I'm not excited about it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: new food for the contrib/ directory
Next
From: Bruce Momjian
Date:
Subject: Re: timeout implementation issues