Multi-column index vs index on individual columns

From: Shantanu Shekhar <shekharshan(at)yahoo(dot)com>
To: Pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Multi-column index vs index on individual columns
Date: 2020-12-26 20:18:21
Message-ID: 1135969024.2853124.1609013901725@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2020-12-26 21:00:10 Re: Problem with ssl and psql in Postgresql 13
Previous Message venkata786 k 2020-12-26 16:21:51 Re: PostgreSQL HA