Re: If an index is based on 3 columns will a query using two of the columns utilize the index?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Reid Thompson <Reid(dot)Thompson(at)ateb(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: If an index is based on 3 columns will a query using two of the columns utilize the index?
Date: 2005-09-12 14:18:46
Message-ID: 20050912141845.GA34597@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 12, 2005 at 10:05:36AM -0400, Reid Thompson wrote:
> Alvaro Herrera wrote:
> > Note that if your example query used the columns (lname, dob),
> > the answer would be "no."
>
> Why is that? In order to use an index, does the query have to utilize
> the 'first' element of the index?

In released versions of PostgreSQL, yes. Version 8.1 will remove
that restriction.

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2005-09-12 14:31:41 Re: If an index is based on 3 columns will a query using two of the columns utilize the index?
Previous Message Reid Thompson 2005-09-12 14:05:36 Re: If an index is based on 3 columns will a query using two of the columns utilize the index?