Secondary Index - can a Value straddle nodes? Or all records for Value be on same Node

Hi,

Given a Secondary-Index on a String, would it be prudent to assume for a bin with a Secondary Index (used to model one - to - many relationship ) –

  • All records with One Value of the Bin would be on One Node ?

It is worth mentioning that Secondary Index does provide Co-location Guarantee for the Indexed records to be on the same node as the Index bin Value.

Thanks

No. Records are inserted across all nodes - effectively evenly. Secondary Index is a b-tree built on a bin value on each node when declared. Max 256 SIs may be declared but only one may be invoked in a query. (Statement.filter). SI query goes to all nodes and data returned from all nodes in parallel back to the client. Akin to scatter-gather.( Each SI has it’s own b-tree(s) by partition-id owned by that node as master and replica and on each node.)

thanks @pgupta for the prompt response, :thinking: Primary goal is to spread the records evenly across all nodes – the Hash Space of the hash function being used.

Makes Sense…Performance is the focus of the architecture.