Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

SASI Query Execution

SSTable Attached Secondary Index (SASI) attaches index structures directly to SSTables, ensuring that the index lifecycle is synchronized with the base data. Like legacy 2i, SASI uses a scatter-gather coordination model for queries that lack a partition key constraint. The key architectural difference is in storage: SASI indexes live alongside SSTables rather than in a separate hidden table.


SASI uses the same scatter-gather pattern as legacy 2i:

Scatter-Gather Pattern: SASIScatter-Gather Pattern: SASIBroadcast to all token ranges(one replica per range)Node Alocal SASI scanNode Blocal SASI scanNode Clocal SASI scanNode Dlocal SASI scanNode Elocal SASI scanNode Flocal SASI scanClientCoordinator1. query4. aggregated result2. scatter3. partial results

Each node executes a local SASI scan against its per-SSTable index components, then performs base table reads for matched partition keys. The coordinator aggregates all partial results and returns them to the client.

For queries with multiple indexed predicates, SASI performs single-pass intersection within each SSTable. Rather than performing separate index lookups and joining results, SASI intersects the index streams during the scan, reducing intermediate result set size.


CharacteristicImplementation
Storage structurePer-SSTable index components (co-located with data)
CompactionSynchronized with base table compaction
Query coordinationStatic scatter-gather
Multi-predicateSingle-pass intersection within SSTables
Memory modelUnbounded during query execution
Index build visibilityNo gossip propagation; status requires manual inspection

Because SASI index components are created and compacted alongside the base SSTables, the index is never out of sync with the data due to independent compaction cycles. This addresses one consistency limitation of legacy 2i.


Aspect2iSASI
StorageHidden table (separate replication)Per-SSTable components (co-located)
Compaction couplingIndependentSynchronized with base table
Multi-predicateSeparate lookups, joined at coordinatorSingle-pass intersection per SSTable
Memory during queryUnboundedUnbounded
Scatter-gather coordinationYesYes

Scatter-gather at cluster scale

Like 2i, every global SASI query contacts one replica per token range. Latency is bounded by the slowest node and degrades as cluster size grows.

LimitationImplication
All-node contact for global queriesLatency degrades linearly with cluster size
Tail latency sensitivityOne slow node delays all results
Unbounded coordinator memoryLarge result sets accumulate before returning to client
No failed index detection via gossipQueries silently skip nodes with failed index state