Re: Query not using the indexes properly.

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Query not using the indexes properly.
Date: 2009-10-02 02:21:35
Message-ID: 855e4dcf0910011921g31084dcfkfa199d844b694f2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> If you try the multi-column index (which is a good idea), be sure that "id"
> is the last of the three columns, since that's the column on which you have
> an inequality test rather than an equality test; eg,
> (company_id,source_model_name,id).
>

Interesting. I would have thought the order of the fields would not
matter. I don't have to rewrite the query do I?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Wilson 2009-10-02 02:25:47 Re: Query not using the indexes properly.
Previous Message Tim Uckun 2009-10-02 02:19:57 Re: Query not using the indexes properly.