Pedro Alves <pmalves@think.pt> writes:
> On Wed, Apr 02, 2003 at 09:52:19AM -0500, Tom Lane wrote:
>> Presently, you'd need an index on (bar,foo) to get a good plan for a
>> query expressed that way.
> Thats what I meant when I said 'I have a composite index in columns foo
> and bar'. In the second query, it doesn't this index.
An index on (foo,bar) isn't equivalent to one on (bar,foo).
regards, tom lane