title: Cassandra DB Java: for each row gotten in query, fetch data stored in seperate table (eg counter table)?
body: <p>Does anyone know of an efficient way to fetch counter data stored in a separate table for each row gotten in a query?</p>
  
  <p>The tables are defined as follows</p>
  
  <pre><code>TABLE person (
      id timeuuid,
      name text,
      many other attributes... );
  TABLE person_counts(
        id timeuuid, //same id as person
        count1 counter,
        PRIMARY KEY (id));
  </code></pre>
  
  <p>The goal is that when persons/single person are fetched, before returning to add the count then return. Is iterating over each person and querying person_counts the only way to achieve this? It needs to be a counter however since I need a certain Primary Key for the person table I cannot have a counter directly there it seems.</p>
  
  <p>I am using datastax cassandra if it makes a difference.</p>