Multicolumn Indexes - Mailing list pgsql-general

From Thomas Yagel
Subject Multicolumn Indexes
Date
Msg-id EOEFLPAIAEDLPGGLIIGNMEDHCJAA.tyagel@yahoo.com
Whole thread Raw
Responses Re: Multicolumn Indexes
List pgsql-general
I have a situtation where a particular table includes a timestamp column and
a id column.  The query I am working with right now filters based on
timestamp and orders based on ID.

I have not found enough information about how multicolumn indexes actually
work to determine if one will help me in this case, but I think that it
might.

Right now the index that I have on timestamp is not used because the Primary
Key(ID) index is chosen for ordering.  If I place a multicolumn index on
(timestamp, id) will that index be able to filter the timestamp and still be
used for returning the ordered IDs?

Also is there any documentation out there that provides more details about
the specific behavior of multi column indexes in Postgresql.

Thanks,
Thomas


pgsql-general by date:

Previous
From: Marco Colombo
Date:
Subject: Re: Mathematical operations with NULL values
Next
From: "Ian Harding"
Date:
Subject: Re: creating audit tables