On Wed, Oct 26, 2011 at 9:35 PM, Ben Gambley <ben.gamb...@intoscience.com>wrote:

>
> Hi Everyone
>
> I have a question with regards read performance and schema design if
> someone could help please.
>
>
> Our requirement is to store per user, many unique results (which is
> basically an attempt at some questions ..) so I had thought of having the
> userid as the row key and the result id as columns.
>
> The keys  for the result ids are maintained in a separate location so are
> known without having to perform any additional lookups.
>
> My concern is that over time reading a single result would incur the
> overhead of reading the entire row from disk so gradually slow things down.
>
>
> So I was considering if changing the row key to *userid + result id* would
> be a better solution ?
>
>

Do you regularly need to read all of the results for a given userid?  If
not, go with the user_id + result_id approach. It will be more efficient for
single-result lookups.

-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Reply via email to