N1QL Indexes Limit

Hello!!
I’m implementing Couchbase Server 4.0 to manage the data storage of an instant messaging app I’m developing. I’ve arrived to the conclusion that the new indexing system of N1QL could help. In this particular case, I want to index user’s messages to make different queries on them (last read message, last synchronization date, etc.). Taking that into account, is it a good strategy to create an index for each conversation in my system? If so, performance would be affected by that? And, is there a limitation in the amount of indexes that can be created or that are recommended to create?

Thanks in advance.
Waiting for an answer or ideas to solve the problem.
Bye,

Luciano

A realistic upper limit on indexes is also something we are interested in knowing about (e.g., in the same way the realistic upper limit on buckets is about 10) We’re looking at increasing the performance of some n1ql queries and wondering if more indexes would hurt or hinder the system over all. We are considering perhaps 3 to 4 hundred time-based indexes. @geraldss any info on this?

Hi @jberglund,

Buckets are cluster-wide, whereas GSI indexes are per-node. So you can scale the number of indexes by adding nodes. Adding @prasad who can provide more detail.

Gerald