Re: Postgres not willing to use an index?

Поиск
Список
Период
Сортировка
От Grzegorz Jaśkiewicz
Тема Re: Postgres not willing to use an index?
Дата
Msg-id 2f4958ff0902060755x2fbd81b3u5c7f4b1d49f133ad@mail.gmail.com
обсуждение исходный текст
Ответ на Postgres not willing to use an index?  (Mario Splivalo <mario.splivalo@megafon.hr>)
Список pgsql-performance
On Fri, Feb 6, 2009 at 3:43 PM, Mario Splivalo
<mario.splivalo@megafon.hr> wrote:

> Besides PK and uq-constraint indices I have this index:
>
> CREATE INDEX transactions_idx__client_data ON transactions
> USING btree (transaction_client_id, transaction_destination_id,
> transaction_operator_id, transaction_application_id,
> transaction_time_commit)

I think it is because it isn't just a simple index, and for some
reason planner decides - that going through every
transaction_application_id, etc, etc just to find right
transaction_time_commit isn't worth the hassle.
Try using few more indexes, on less columns.
Also, if I may - I don't think it is quite usefull to have column
names that include table name in every single one of them, makes
things so much less readable.

--
GJ

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

Предыдущее
От: Mario Splivalo
Дата:
Сообщение: Postgres not willing to use an index?
Следующее
От: justin
Дата:
Сообщение: Re: suggestions for postgresql setup on Dell 2950 , PERC6i controller