SecondaryIndex

@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class SecondaryIndex

Creates a native ScyllaDB secondary index on this column.

WARNING: Secondary indexes use scatter-gather across ALL nodes in the cluster. Only use for low-cardinality fields (e.g. accountStatus, isVerified) and non-hot-path queries. Never use on high-cardinality columns like email or userId — use @LookupIndex instead for those.

Kandra logs a WARN every time a secondary index query executes in production to remind developers of the cost.