How does it work ? SASI (SSTable attached secondary indexes)
Hello Cassandra Developer,
Today, we will talk about how does indexes work into Cassandra, mainly about SASI.
Motivation factor :
- It's help you to fulltext search
- It's can be get by secondary index on cassandra columns
- it's help you to get unpredicate search query on cassandra data model
How does it work (SSTable - secondary indexes):
- Maintain complete indexes data into single SSTable(kind of concurrent thread safe map collection in java)
- Since it's single SSTable, it has memory issue and need good RAM when huge data.
- it's called as "Classic C* Indexes"
- Support few basic comparison operation ("=").
- It's based on SSTable format.
- Support into Cassandra older version (less than 3.3)
- SSTable need to play with memory & disk operation for indexes data.
How does it work (SASI):
- Maintain the Token tree base format - (B tree collection concept in java)
- It's create the different separate SASI for each indexes , each index would have separate file i mean.
- Since it's sets of small chunk/dataset, search performance faster
- Support into Cassandra version(3.4)
- Complete index data built into memory and then store into disk for normal cases
- Support Inequality & intersect scan operation too (look image)
Below is quick comparison chart :
New Operation support into SASI as below
Comments