Query planning around one key of a multi-column index

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Query planning around one key of a multi-column index
Date: 2019-12-19 00:42:24
Message-ID: CAOC+FBWZKgW9d2613DLg8MPfYXaQ3KweXFV3MWawK43rJt=C8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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>

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Craig James 2019-12-19 03:02:45 Re: Query planning around one key of a multi-column index
Previous Message Tom Lane 2019-12-18 19:01:48 Re: Strange inconsistency using psql