title: cassandra 2.0.11 - column count for partition key
body: <p>Lets consider following table taken from <a href="http://planetcassandra.org/blog/getting-started-with-time-series-data-modeling/" rel="nofollow">http://planetcassandra.org/blog/getting-started-with-time-series-data-modeling/</a> <br></p>
  
  <pre><code>CREATE TABLE temperature 
  (
      weatherstation_id text,
      event_time timestamp,
      temperature text,
      PRIMARY KEY (weatherstation_id,event_time)
  );
  </code></pre>
  
  <p>So <code>weatherstation_id</code> is the partition key and <code>event_time</code> is the clustering column. <br>
  Data is loaded to that table and then we run query:</p>
  
  <pre><code>SELECT COUNT(1) FROM temperature WHERE weatherstation_id = '1234ABCD'
  </code></pre>
  
  <p>So actually we are asking for number of columns in underlying cassandra storage row. <br> </p>
  
  <p><strong>1) Is it a O(1) operation? <br> 
  2) If not - how to achievie O(1) in counting columns in a cassandra storage row? Use counters?</strong></p>
  
  <p>(I am using Cassandra v2.0.11)</p>
  
  <p>Thank you</p>