Re: Forcing use of indexes - Mailing list pgsql-general

From Tom Lane
Subject Re: Forcing use of indexes
Date
Msg-id 21230.1049297795@sss.pgh.pa.us
Whole thread Raw
In response to Re: Forcing use of indexes  (Pedro Alves <pmalves@think.pt>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] error: lost syncronization with server
Next
From: Dennis Gearon
Date:
Subject: Re: Earth distance