Multi-column index vs index on individual columns - Mailing list pgsql-general

From Shantanu Shekhar
Subject Multi-column index vs index on individual columns
Date
Msg-id 1135969024.2853124.1609013901725@mail.yahoo.com
Whole thread Raw
Responses Re: Multi-column index vs index on individual columns  (Guyren Howe <guyren@gmail.com>)
List pgsql-general
Hi,

I was going through Postgres documentation on multi-column indexes and came across the recommendation at the bottom states: "Multicolumn indexes should be used sparingly. In most situations, an index on a single column is sufficient and saves space and time". 

In my experience typical webapps the queries are known ahead of time and lot of the times the queries are restricted to a single table (no joins). Does this recommendation that still apply in this use-case? I was under the impression that instead of scanning multiple indexes and then combining the results, it may be more performant to simply use a single multi-index column. 

Thanks,

Shantanu

pgsql-general by date:

Previous
From: venkata786 k
Date:
Subject: Re: PostgreSQL HA
Next
From: Tom Lane
Date:
Subject: Re: Problem with ssl and psql in Postgresql 13