Difference between index and data nodes

Hey All,I have a conceptual question. Is it necessary to have a data node if I am indexing on 100% of the fields in the document? Is it possible to only have index nodes or are data nodes required? and why?

Thanks!

Index nodes gets data from data nodes.
Couchbase cluster will not allow you configure other services with out data service (data node).
Query service requires indexer service.

That is understood, but does it make sense then to have essentially everything that is present in the document indexed? that would be almost as if we were replicating the document in the index node no?

Everything present in index doesn’t right unless it is very tiny documents.
Index contain the predicate fields . if possible cover if number of keys are small.

I am aware of that, but even if everything in your predicate is in your index if you are selecting a field that is not in your predicate a fetch operation occurs, which causes for slowdowns. The problem we are having is when you are expecting many sets of data to return the fetch operation creates a significant slowdown.

create covering index on predicate, project document keys and use SDK asynchronously fetch document.

so are you suggesting something like this?

SELECT META().id
FROM bucket
WHERE

then run async calls in the java on all the id’s and pull what we want from there?

and this will come back faster then a single N1QL query? for some context a query pulling about 20 fields 15 of which are covered in the index when pulling 2500 unique records comes back in 500-700 milliseconds.

The same query if ran just for META().id returns about 10 times faster. if I run an async call after I should be able to get all the documents back faster than 400 milliseconds? as well as not cause harm to the application with 2500 concurrent lookups( or is this internall happening anyway with the n1ql?)

Thanks for engaging in this discussion!

It all depends on how many fields in where clause and size of documents.

You can try and measure it.

1 Like

will try and see what it looks like