Re: Query planning around one key of a multi-column index - Mailing list pgsql-admin

From Tom Lane
Subject Re: Query planning around one key of a multi-column index
Date
Msg-id 18012.1576734429@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query planning around one key of a multi-column index  (Wells Oliver <wells.oliver@gmail.com>)
List pgsql-admin
Wells Oliver <wells.oliver@gmail.com> writes:
> 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?

Nope.  The planner will consider that, though in most cases it's likely
to estimate that there's no benefit to using the index in such cases.
Try reading the *actual* docs, not some third-party site:

https://www.postgresql.org/docs/current/indexes-multicolumn.html

            regards, tom lane



pgsql-admin by date:

Previous
From: pratmeht
Date:
Subject: Re: DDLs of a Function
Next
From: Douglas Reed
Date:
Subject: Problem with Altering a table column