3 ms·
Best of summary of the Cassandra data model I've seen: HashMap<PartitionKey, OrderedSet<ClusterKey>> So you can lookup data by the ParititionKey, then perform
by jimbokun 6y ago
Best of summary of the Cassandra data model I've seen:
HashMap<PartitionKey, OrderedSet<ClusterKey>>
So you can lookup data by the ParititionKey, then perform range queries on the ClusterKey to filter data belonging to that partition.
If your access patterns look like that, Cassandra could be a great fit.
For anything else, you probably want to consider a different data store.
- koolba 6y agoHa! That's pretty succinct. Though HashMap should be just "Map" and the value of the top level map is not a set, it's another map: Map<PartitionKey, SortedMap<ClusterKey, Record>>
- deleted 6y ago[deleted]
- garyrichardson 6y agoMaking CQL SQL-Like was the worst possible thing the designers could have done. Newbies want to do SQL joins and filtering with it until they've been a few times. C* is essentially scaled/automated MySQL Sharding and blob storage.. except you pay a huge cost for any server side filtering. The Partition Key would be the equivalent of your MySQL shard id. ClusterKey is your primary key. if you treat everything like PUT $paritionKey, $primaryKey, $data and GET $partitionKey, $primaryKey you get a slow and massively scaling redis. If you do anything else with it you'll likely start regretting your choices and looking for a replacement database.