title: Using Cassandra for time series data
body: <p>I'm on my research for storing logs to Cassandra.<br>
  The schema for logs would be something like this.</p>
  
  <p>EDIT: I've changed the schema in order to make some clarification.</p>
  
  <pre><code>CREATE TABLE log_date (
    userid bigint,
    time timeuuid,
    reason text,
    item text,
    price int,
    count int,
    PRIMARY KEY ((userid), time) - #1
    PRIMARY KEY ((userid), time, reason, item, price, count) - #2
  );
  </code></pre>
  
  <p>A new table will be created for the day everyday.
  So a table contains logs for only one day.</p>
  
  <p>My querying condition is as follows.<br>
  Query all logs from a specific user on a specific day(date not time).<br>
  So the reason, item, price, count will not be used as hints or conditions for queries at all.<br></p>
  
  <p>My Question is which PRIMARY KEY design suits better.<br>
  EDIT: And the key here is that I want to store the logs in a schematic way.</p>
  
  <p>If I choose #1 so many columns would be created per log. And the possibility of having more values per log is very high. The schema above is just an example. The log can contain values like subreason, friendid and so on.</p>
  
  <p>If I choose #2 one (very) composite column will be created per log, and so far I couldn't find any valuable information about the overhead of the composite columns.</p>
  
  <p>Which one should I choose? Please help.</p>