1
votes

I'm studying through Cassandra and ran into the concept of OPP (which is highly discouraged) and Clustering Key

http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/create_table_r.html

They seem to do the same job i.e. order rows in a specific column family by a specific column. Can anyone distinguish the difference here?

2

2 Answers

1
votes

Clustering and partitioning are 2 different things. Clustering concerns data ordering within a partition (aka wide row) and not the order of partitions (what opp was: order preserving partitioner).

HTH, Carlo

0
votes

I think the difference is cluster maintenance: OPP (bad) vs clustering keys/Murmur3 (good). Easy row slicing was a benefit that BOP/OPP offered. Row slicing was not easy using random partitioning. The price you paid in cluster maintenance using BOP/OPP was not worth it, I've heard. Using BOP/OPP, users had balancing issues when adding new data with non-uniform keys, or keys of a different size. Today, CQL offers the capability to slice over partition rows http://www.datastax.com/documentation/cql/3.1/cql/cql_using/use-slice-partition.html.