Re: Query not using the indexes properly. - Mailing list pgsql-general

From Tim Uckun
Subject Re: Query not using the indexes properly.
Date
Msg-id 855e4dcf0910011921g31084dcfkfa199d844b694f2@mail.gmail.com
Whole thread Raw
In response to Re: Query not using the indexes properly.  (David Wilson <david.t.wilson@gmail.com>)
Responses Re: Query not using the indexes properly.
List 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?

pgsql-general by date:

Previous
From: Tim Uckun
Date:
Subject: Re: Query not using the indexes properly.
Next
From: David Wilson
Date:
Subject: Re: Query not using the indexes properly.