Re: Composite keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Composite keys
Дата
Msg-id 5180.1320087559@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Composite keys  (Claudio Freire <klaussfreire@gmail.com>)
Список pgsql-performance
Claudio Freire <klaussfreire@gmail.com> writes:
> On Mon, Oct 31, 2011 at 2:08 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>>> 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.

> Does postgres generate those kinds of plans?

Sure it does.  It doesn't usually think they're efficient enough,
because they require full-index scans.  But sometimes that's the
best you can do.

            regards, tom lane

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: SSL encryption makes bytea transfer slow
Следующее
От: Tom Lane
Дата:
Сообщение: Re: does update of column with no relation imply a relation check of other column?