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