We are using couchbase community edition. In order to leverage index on community edition we have created same index for same columns with different name on other nodes as on community the index is not replicated across nodes.
So on community edition when we create index does it built indices for data available on that node or does it account for all nodes ?.
And if the index account for all data nodes when an query picks the index we see one node is returning faster and where as the other node is taking time with more CPU cycles.
There is no replication of Indexes in CE. But you can create separate indexes with same columns with different name and it called equivalent index. Each one is built its own but during execution it detects those are all same and does load balancing.
The index is global index. Each index include all the data from all the nodes.
Thank you appreciate your input but are we sure during execution plan the optimizer makes two index though its different name for same column and treat them as one ?. Does the explain plan will show those behavior ?
Will you be able to guide me in pointing out the document which I can refer regarding this topic.
Index replica is EE only. You can create equivalent indexes (same definition expect different name, created manually) in CE. Single query uses one index only, but same queries can use different indexes and do load balancing.