r/cassandra • u/HeartFormer3313 • Mar 25 '26
How are you handling evolving query patterns in Cassandra?
I’ve been speaking with a few teams running Cassandra in production, and one pattern that keeps coming up is how much the data model has to be shaped around specific queries.
In one case, the same client session data ended up being duplicated across 10+ tables just to support different access patterns. As new requirements came up — like additional filters, aggregation, or partial search — things started getting pushed to other systems like Elastic.
Curious how others are dealing with this in practice:
- Do you create new tables for every new query pattern?
- How do you handle aggregation workloads (counts, sums, etc.)?
- Are you relying on external systems for search or analytics?
- How do you deal with evolving requirements over time?
Not trying to knock Cassandra — it clearly handles scale and write throughput really well. Just trying to understand how teams are managing this side of things in real-world setups.
5
u/rustyrazorblade Mar 25 '26
There isn't a single solution that can be applied in all circumstances. Sometimes you have to create another table. Sometimes you use opensearch, or redis, or SAI. Figuring out the optimal solution means understanding the tradeoffs.
1
u/tungd Mar 26 '26
In most cases it’s the other way around, we don’t really query Cassandra directly. Cassandra serves as the write buffer. I have a main table that we model almost as a log table, partitioned by tenant/merchants within that tenant + timestamp/timebased uuid/ulid. Anything else we will just run batch job/cdc and put it to the more appropriate datastore. We can have per tenant tables/db with different indexes. Evolving query patterns then become evolving your set of batch jobs