title: Cassandra: Is partition key also used in clustering?
body: <p>Let's say I have a primary key like this: <code>primary key (PK, CK)</code>. </p>
  
  <p>Based on what I read (see refs), I think I can loosely describe the way Cassandra uses <code>PK</code> and <code>CK</code> as follows - <code>PK</code> will be used to decide which node(s) the data should go to and <code>CK</code> will be used for clustering (aka ordering) of data within that node.</p>
  
  <p>Then, it seems <code>PK</code> is not used in clustering data within the node and that sounds wrong. What if I have a simple primary with with just <code>PK</code>? Will Cassandra only distribute data across nodes and not order data within each node since there is no clustering column?</p>
  
  <p>refs: </p>
  
  <ul>
  <li><a href="https://docs.datastax.com/en/cql/3.1/cql/ddl/ddl_compound_keys_c.html" rel="nofollow noreferrer">https://docs.datastax.com/en/cql/3.1/cql/ddl/ddl_compound_keys_c.html</a></li>
  <li><a href="https://stackoverflow.com/questions/24949676/difference-between-partition-key-composite-key-and-clustering-key-in-cassandra">Difference between partition key, composite key and clustering key in Cassandra?</a></li>
  </ul>