Re: single index on more than two coulumns a bad thing?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: single index on more than two coulumns a bad thing?
Дата
Msg-id 871xn7otz1.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на single index on more than two coulumns a bad thing?  (Palle Girgensohn <girgen@pingpong.net>)
Список pgsql-performance
Palle Girgensohn <girgen@pingpong.net> writes:

> Is it always bad to create index xx on yy (field1, field2, field3);

All generalisations are false...

Seriously, it's true that as the length of your index key gets longer the
harder and harder it is to justify it. That doesn't mean they're always wrong,
but you should consider whether a shorter key would perform just as well.

The other problem with long index keys is that they often show up in the same
place as having dozens of indexes on the same table. Usually in shops where
the indexes were created after the fact looking at specific queries.

--
greg

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Index Performance Help
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL and Linux 2.6 kernel.