In couchbase always primary key is the partition key?Do users have the freedom to pick partition key and primary key separately like in cassandra?
Lets say primary key in couchbase is ( A ,B,C)
Can we have partition key as (A,B) in couchbase?
Or is it always primary key is fixed as partition key in couchbase to distribute data across dataservice bucket nodes?
Also does couchbase support clustered columns to sort data within a data service bucket node?
Speaking for the primary data service, and the analytics service may have some other options… In the early days of Couchbase we discussed whether or not we should allow applications to define a hash key in addition to the key. We decided to keep it simple and while we left some room for doing that architecturally, the only implementation we have at the moment is hashing by the full key.
Technically what we do is hash to a logical partition where we have a large number of logical partitions, then we map those logical partitions to the nodes in the cluster. By doing this, we can redistribute data as needed without needing to visit all data on a given node. We also take advantage of this hashing all the way down to the client library, so when your app needs to retrieve a piece of data through the KV interface, it knows exactly which node to go to which lets us keep memcached like latencies/throughputs.
Hopefully that helps a bit.
Based on where your description of use case is going, it sounds a bit more analytical rather than operational? Maybe you can describe your data access goals a bit and we can help you with how best to structure that between data/analytics to meet your goals.