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