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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: single index on more than two coulumns a bad thing?
Дата
Msg-id 18754.1080880598@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: single index on more than two coulumns a bad thing?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-performance
Josh Berkus <josh@agliodbs.com> writes:
>> Is it always bad to create index xx on yy (field1, field2, field3);

> I'm afraid that you've been given some misleading advice.

I'd say it's a matter of getting your optimizations straight.

If you have a query that can make use of that index, and the query is
executed often enough to make it worth maintaining the index during
table updates, then by all means make the index.

The standard advice is meant to warn you against creating a zillion
indexes without any thought to what you'll be paying in update costs.
Indexes with more than a couple of columns are usually of only narrow
applicability, and so you have to be sure that they'll really pay for
themselves...

            regards, tom lane

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: single index on more than two coulumns a bad thing?
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Index Performance Help