SASI concepts
Astra DB and DSE 6.9 do not support SSTable-Attached Secondary Indexing (SASI). SASI is an experimental feature in Apache Cassandra® and Hyper-Converged Database, and a beta feature in DataStax Enterprise 6.8. DataStax does not recommend using SASI in production. Instead, use Storage Attached Indexes (SAI) for indexing in Cassandra 5.0 or later, DSE 6.8 or later, HCD, and Astra DB. |
SSTable-Attached Indexing (SASI) is a highly-scalable, per-SSTable index for Cassandra and DataStax Enterprise databases. SSTable Attached Secondary Indexes (SASI) are implemented as a corresponding index file for each SSTable created on disk. SSTables are created during normal flush from memtable to disk, during compaction, and during streaming operations (node joining or being decommissioned). SASI enables full text search as well as faster multi-criteria search in CQL.
SASI can be less resource-intensive, using less memory, disk, and CPU than the built-in secondary index (2i) implementation.
Providing a different functionality than 2i or SAI, SASI allows queries that filter using partial or full text matches.
SASI enables querying with prefix, suffix, or substrings on strings, similar to the SQL implementation of LIKE = "foo%"
, LIKE = "%foo"
, or LIKE = "%foo%"
in SELECT
queries.
It also supports SPARSE
indexing to improve performance of querying large, dense number ranges such as time series data.
SASI indexes can be created on any non-partition key columns of any CQL data type, except collections.
SASI enables queries that filter based on:
-
AND
logic -
numeric range
-
text type equality
-
CONTAINS
logic forLIKE
queries -
PREFIX
logic forLIKE
queries -
tokenized data
-
row-aware query path
-
case sensitivity (optional)
-
unicode normalization (optional)