Re: Index on multiple columns VS multiple index - Mailing list pgsql-sql

From Jonathan S. Katz
Subject Re: Index on multiple columns VS multiple index
Date
Msg-id B8172ABC-0EB4-4859-8D93-A7CB11DA6785@excoventures.com
Whole thread Raw
In response to Re: Index on multiple columns VS multiple index  (Brice André <brice@famille-andre.be>)
Responses Re: Index on multiple columns VS multiple index
List pgsql-sql
On Jan 2, 2014, at 3:00 PM, Brice André wrote:

> But I have still one question that remains :
>
> suppose I define an index on ('a', 'b') columns, will it be useful for a search on 'a' column only, or will it be
ignoreby postgresl ? 

If you define the index on ('a', 'b') in that order and are just searching for 'a' in your query, the query planner
willuse the index. 

Jonathan




pgsql-sql by date:

Previous
From: "Jonathan S. Katz"
Date:
Subject: Re: Index on multiple columns VS multiple index
Next
From: Brice André
Date:
Subject: Re: Index on multiple columns VS multiple index