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

From: "Reid Thompson" <Reid(dot)Thompson(at)ateb(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: If an index is based on 3 columns will a query using two of the columns utilize the index?
Date: 2005-09-12 13:43:57
Message-ID: F71C0DC6B4FD3648815AAA7F969E35290194F1F3@sr002-2kexc.ateb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Example:
assume a table of 10 columns, three of which are fname, lname, and dob.
If an index is created on (fname, lname, dob), will a query that
utilizes two of the columns ( select 'data' from table where fname = 'X'
and lname = 'Y') utilize the index?

thanks,
reid

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2005-09-12 14:00:41 Re: If an index is based on 3 columns will a query using two of the columns utilize the index?
Previous Message Peter Eisentraut 2005-09-12 13:32:08 Re: Replication