I have select query that java sdk generates using N1QL utils. Below is the query.
select * from users where user.status = “ACTIVE” and Date BETWEEN “2019-06-26” AND “2019-06-30” and group in [“xyz”, “abc”] and service = “XXX”;
This query can be changed dynamically , some times only two predicates can be present and some times 6 predicates with AND operator.
Question : Do I need to use the predicates in specific order (i.e some times user.status can be last predicate instead of first predicate). Does the order matters ?
This query can change in future with 6 to 8 predicates. So how many indexes need to create to get best performance.