I have a N1QL query which is covered and the predicate contains one array with (ANY x IN array SATISFIES x = “string”) and 4 range predicates.
The index contains ~600k documents.
Now the query performance is heavily dependant on the string I am querying for. For one string (a lot of documents contain that string in the array) the query completes in 368.26ms (index scan time: 00:00.3592). For another string (not so much documents contain that string in the array) it is 12.33s (index scan time: 00:12.3154).
How do I improve the IndexScan time? I thought index nodes need memory, number of cores is not that important. But the index resides completely in memory. Should I increase the number of cores or use faster cores or something different?