All Sessions Now On Demand – Innovative use cases, NoSQL best practices, and more.
Watch Now

Which One to Pick and Summary

7 min to complete

So, out of global indexes, local indexes, and filtering. Which one to pick, what’s the best option? Here are some tips. Filtering is by far the cheapest option when it comes to storage, as it consumes 0 additional bytes. It’s also the simplest one to use, as it requires no DDL management like creating an index. Then, we should consider how selective will our queries be. If we expect to fetch the majority of the rows often, filtering is most likely still the best alternative. Otherwise, indexing should be considered. If our queries tend to ask for a single partition, then that’s the target use case for local indexes. Otherwise, if queries are usually multi-partition, global indexes may be the way to go. The best advice I can give is to benchmark first, pick later.