Re:Speeding Up PostgreSQL with Partial Indexes
by wiredfool on Wednesday December 10, 2014 @03:04PM
(#8731341)
But a multicolumn index on (b, c, a) would be effective for a query on (b, c), as well as on (a, b, c).
[ Parent
| on HN ]
Re:Speeding Up PostgreSQL with Partial Indexes
by MSM on Wednesday December 10, 2014 @03:17PM
(#8731414)
but not for any combination that doesn't have B leading.
If you're always going to query those fields in that order, that's a perfect way to do things. If you'll be querying it a couple different ways then you're way better off with three separate one column indexes assuming the RDBMS can make use of index intersection.