Postgres multicolumn vs combined single column indexes The answer is always "run it and see how it works on your dataset" of course, but looking for general guidelines here. I have three queries:

... WHERE A = '...' AND P = '...' AND Q = '...'
... WHERE B = '...' AND P = '...' AND Q = '...'
... WHERE C = '...' AND P = '...' AND Q = '...'


The first query featuring A will be more common. Any general recommendations on whether to use 5 separate single column indexes, or whether to use 3 combined (A, P, Q), (B, P, Q), (C, P, Q) ?
If the P = '...' AND Q = '...' is highly selective, I would just put one index on that pair of columns and leave it at that.  If it is only moderately selective and if I needed individual indexes on A, B, and C anyway for other queries, then I'd probably tack P and Q onto the end of each of those indexes, unless the P and Q columns are wide and so would bloat the size of the indexes.

I wouldn't use 5 separate single column indexes for this, unless I needed each one for some other purpose anyway.  They would have to be combined with a BitmapAnd, which is much less efficient than using a multi-common index with equality conditions.