Re: Multiple-index optimization not working for = ANY operator - Mailing list pgsql-general

From Tom Lane
Subject Re: Multiple-index optimization not working for = ANY operator
Date
Msg-id 20660.1140044977@sss.pgh.pa.us
Whole thread Raw
In response to Multiple-index optimization not working for = ANY operator  ("Jimmy Choi" <JCHOI@altera.com>)
List pgsql-general
"Jimmy Choi" <JCHOI@altera.com> writes:
> I find that it doesn't work (i.e. index is not used and a sequential
> scan is needed), if I have the following instead:
>   SELECT * FROM foo WHERE id = ANY (ARRAY[1,2]);
> Is this expected?

Yes. That construct isn't indexable, period, in any existing release
(it does work in CVS tip though...)

            regards, tom lane

pgsql-general by date:

Previous
From: Rick Gigger
Date:
Subject: Re: I see this as the end of BDB in MySQL without a doubt.
Next
From: Reid Thompson
Date:
Subject: Oracle tried to buy MySQL