Hello, In the following N1QL query, I have a GSI Index partially covering it
GSI Index ->
CREATE INDEX index00101 ONdatastore(filter1, filter2) WHERE ( type = "RP")
N1QL ->
select META(t).id as documentUID from `datastore` t
where
type = "RP" and filter1 = "JMT" and (filter2 In ["D0000"])
and (filter3 In ["AA13C"])
I have total 27 Million Documents, after apply predicates on type & filter1, filter2 using GSI, it comes down to 200,000 + documents.
In order to apply the third filter, Couchbase Query Nodes will have to fetch documents, apply additonal filter.
This query Is taking approximately 1 minute to execute. I am just wondering if there is any optimization I can do on the cluster to increase the Query response.
I don’t want to create a covering Index and would like Couchbase Query Nodes retrieve the documents and apply filter as this will be our use case in majority of cases.
Fetch the data may be taking time and that is already parallelized. Also CE version Query service is limited to 4 CPUs. You can adjust few fetch parameter and see if that helps
For each query service(parameters are reset to default if query service is restarted)