Let’s say my documents have the following 2 fields (among others):
type: which can only be either “type1”, “type2” and “type3”
And I need to query by both fields at the same time
In terms of indexes, what would be better?
A single index for: type, name
Or 3 partial indexes: name where type = “type1”, name where type = “type2”, etc…
Follow up question: assuming multiple partial indexes is better, what if type could have 10 values instead of 3.