DataLane

All stacks · Operational data stores

Cassandra

Wide-column serving stores and the modeling rules that keep them fast.

Cassandra cover
Illustrated overview of Cassandra: A New Query Is a New Table, Not a New Index Hope
Cassandra
4 min read

Cassandra: A New Query Is a New Table, Not a New Index Hope

ALLOW FILTERING timed out the coordinator and a "quick report" full-scanned the serving cluster. Model the query first, extract without a table scan, and keep Cassandra off the warehouse path.

  • cassandra
  • serving

About Cassandra

Cassandra (and Scylla) is a wide-column serving store: query-first modeling, partition keys, and no joins. Data engineers meet it as a sink for features or a source that cannot be SQL-scanned like Postgres.

What you'll learn here

  • Partition key vs clustering key — this is the whole model
  • Why “just add an index” is not the warehouse answer
  • TTL, repairs, and the ops you inherit
  • CDC / extract patterns that do not full-scan the cluster

Frequently asked questions

Can I use Cassandra as a warehouse?

No. Wrong access pattern, wrong cost, no SQL grain. Extract to a lake/warehouse for analytics. Cassandra is for known keys at serving latency.

How do I model a new query?

New table (or materialized view, with eyes open). You do not add a join. If the product adds a query path, the table design changes. That is the interview answer.

Cassandra or Redis for features?

Redis for hot, small, volatile keys. Cassandra for larger, durable, query-shaped serving. Many ML platforms use both.

New Cassandra posts, straight to your inbox

One email a week with our latest tutorials. No spam.

Newsletter signup is not live yet. Use the contact form if you want to be notified.

↑↓ navigate openesc close