From: | Wells Oliver <wells(dot)oliver(at)gmail(dot)com> |
---|---|
To: | Craig James <cjames(at)emolecules(dot)com> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Query planning around one key of a multi-column index |
Date: | 2019-12-19 04:18:46 |
Message-ID: | CAOC+FBWzn-TK99tZNP4s=HkFk1qWr6QXGnqDarLCKrBK5g_tXA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
But so are you guys!
Thanks, this is helpful.
Is it really always true that querying off any column that's not the first
column of a multi-column index will NOT use that index?
On Wed, Dec 18, 2019 at 7:02 PM Craig James <cjames(at)emolecules(dot)com> wrote:
> Google is your friend:
>
> http://www.postgresqltutorial.com/postgresql-indexes/postgresql-multicolumn-indexes/
>
> On Wed, Dec 18, 2019 at 4:43 PM Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
> wrote:
>
>> I've been using PG now for so many years and I don't have a solid
>> concrete answer on this in my head, and I feel like I should: if I have a
>> table with a multi-column index and I query on one of those columns (or
>> some subset of those columns), will it use that index?
>>
>> Is there more reading on this topic? I've always felt it's a little more
>> complicated but I'm not quite sure.
>>
>> --
>> Wells Oliver
>> wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>
>>
>
>
> --
> ---------------------------------
> Craig A. James
> Chief Technology Officer
> eMolecules, Inc.
> 3430 Carmel Mountain Road, Suite 250
> San Diego, CA 92121
> ---------------------------------
>
--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | pratmeht | 2019-12-19 05:01:44 | Re: DDLs of a Function |
Previous Message | Craig James | 2019-12-19 03:02:45 | Re: Query planning around one key of a multi-column index |