Re: Multiple-index optimization not working for = ANY operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jimmy Choi" <JCHOI(at)altera(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Multiple-index optimization not working for = ANY operator
Date: 2006-02-15 23:09:37
Message-ID: 20660.1140044977@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Jimmy Choi" <JCHOI(at)altera(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Reid Thompson 2006-02-16 00:04:34 Oracle tried to buy MySQL
Previous Message Rick Gigger 2006-02-15 22:56:36 Re: I see this as the end of BDB in MySQL without a doubt.