Index on multiple columns VS multiple index - Mailing list pgsql-sql

From Brice André
Subject Index on multiple columns VS multiple index
Date
Msg-id CAOBG12m10zcGwHY_g8+Mwhs2sXjBvue5EqidHGj+pZtH3XFCXw@mail.gmail.com
Whole thread Raw
Responses Re: Index on multiple columns VS multiple index  ("Jonathan S. Katz" <jonathan.katz@excoventures.com>)
List pgsql-sql
Hello everyone,

I have a question concerning index : suppose I have a table with fields 'a' and 'b' and that all requests perform WHERE clauses on 'a' field, and some requests also perform WHERE clauses on 'b' fields. What is the best approach for indexing strategy:
  • One index on 'a' and one on 'b'
  • One index on both columns 'a' and 'b'
  • A combination of both solutions ?

Thanks in advance,

Brice

pgsql-sql by date:

Previous
From: Achilleas Mantzios
Date:
Subject: Re: Query caching (with 8.3)
Next
From: "Jonathan S. Katz"
Date:
Subject: Re: Index on multiple columns VS multiple index