Re: Postgres not willing to use an index? - Mailing list pgsql-performance

From Grzegorz Jaśkiewicz
Subject Re: Postgres not willing to use an index?
Date
Msg-id 2f4958ff0902060755x2fbd81b3u5c7f4b1d49f133ad@mail.gmail.com
Whole thread Raw
In response to Postgres not willing to use an index?  (Mario Splivalo <mario.splivalo@megafon.hr>)
List 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 by date:

Previous
From: Mario Splivalo
Date:
Subject: Postgres not willing to use an index?
Next
From: justin
Date:
Subject: Re: suggestions for postgresql setup on Dell 2950 , PERC6i controller