Query planning around one key of a multi-column index

Wells Oliver <[email protected]> Wed, 18 Dec 2019 16:42:24 -0800
Newsgroups gmane.comp.db.postgresql.admin
Message-ID <CAOC+FBWZKgW9d2613DLg8MPfYXaQ3KweXFV3MWawK43rJt=C8Q@mail.gmail.com>
--000000000000dd3aa8059a03d7bc
Content-Type: text/plain; charset="UTF-8"

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
[email protected] <[email protected]>

--000000000000dd3aa8059a03d7bc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I&#39;ve been using PG now for so many years and I do=
n&#39;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 t=
hose columns (or some subset of those columns), will it use that index?</di=
v><div><br></div><div>Is there more reading on this topic? I&#39;ve always =
felt it&#39;s a little more complicated but I&#39;m not quite sure.<br></di=
v><div><br>-- <br><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=
=3D"gmail_signature"><div dir=3D"ltr"><div>Wells Oliver<br><a href=3D"mailt=
o:[email protected]" target=3D"_blank">[email protected]</a></div>=
</div></div></div></div>

--000000000000dd3aa8059a03d7bc--