Quesion on the use of indexes

Поиск
Список
Период
Сортировка
От Benjamin Krajmalnik
Тема Quesion on the use of indexes
Дата
Msg-id F4E6A2751A2823418A21D4A160B689887B0362@fletch.stackdump.local
обсуждение исходный текст
Ответы Re: Quesion on the use of indexes
Список pgsql-performance

A little background – I have various multi-column indexes whenever I have queries which restrict the output based on the values of the 2 fields (for example, a client code and the date of a transaction).

Is there a performance gain using this approach as opposed to using 2 separate indexes, one on the first column and one on the second column?

 

The reason I am asking is that my coding convetion goes back to the days where I used ISAM tables, so the systems did not know how to use more than a single index.

In some cases, I may have an index on (columna, columnb)  and one on (columnb, columna) due to the data access patterns.  If there are no performance gains in having these multi-part indexes, and performance will be the same as having one index solely on columna and one solely on columnb, then I can reduce the disk usage significantly in some cases.

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

Предыдущее
От: "Aaron Burnett"
Дата:
Сообщение: Re: Very poor performance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Quesion on the use of indexes