Multicolumn Indexes

Поиск
Список
Период
Сортировка
От Thomas Yagel
Тема Multicolumn Indexes
Дата
Msg-id EOEFLPAIAEDLPGGLIIGNMEDHCJAA.tyagel@yahoo.com
обсуждение исходный текст
Ответы Re: Multicolumn Indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Marco Colombo
Дата:
Сообщение: Re: Mathematical operations with NULL values
Следующее
От: "Ian Harding"
Дата:
Сообщение: Re: creating audit tables