Solution On Index


#1

Is it better to give a choice to couchbase engine to select the index or we need to define proper index in the code and restrict it?


#2

@shilpa.rameshwara

You can use USE INDEX (“index you like”) in your N1QL statement


#3

N1QL uses rule based optimization and try to pick the best index based on rules. You can also USE INDEX option provide the hint.