Re: Composite keys

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Composite keys
Дата
Msg-id CA+TgmoY4Q+CyvxEVcNRjtMH_HeCP+uNXkrC8goVDVktsbAPNnA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Composite keys  (Claudio Freire <klaussfreire@gmail.com>)
Ответы Re: Composite keys
Список pgsql-performance
On Tue, Oct 11, 2011 at 8:52 PM, Claudio Freire <klaussfreire@gmail.com> wrote:
> On Tue, Oct 11, 2011 at 5:16 PM, Carlo Stonebanks
> <stonec.register@sympatico.ca> wrote:
>> Question 2) Regardless of the answer to Question 1 - if another_id is not
>> guaranteed to be unique, whereas pkey_id is – there any value to changing
>> the order of declaration (more generally, is there a performance impact for
>> column ordering in btree composite keys?)
>
> Multicolumn indices on (c1, c2, ..., cn) can only be used on where
> clauses involving c1..ck with k<n.

I don't think that's true.  I believe it can be used for a query that
only touches, say, c2.  It's just extremely inefficient.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

В списке pgsql-performance по дате отправления:

Предыдущее
От: Sören Meyer-Eppler
Дата:
Сообщение: Re: PostgreSQL 9.0.4 blocking in lseek?
Следующее
От: Jens Reufsteck
Дата:
Сообщение: Re: Anti join miscalculates row number?