I saw some implemenations/examples using combined keys as <key1>_<key2>_<Long.MAX-now().inMilliseconds()>.
This way you can subselect on key1/key2/time; in your case this would just be use/time. Not time becomes ascending due to the (max-now) rule, so your latest additions come first. HTH -wim -----Original Message----- From: Sujee Maniyam [mailto:[email protected]] Sent: woensdag 30 september 2009 8:29 To: [email protected] Subject: Re: table design suggestions... > You can either create 2 tables. One can have the user as the key and the > other can have the country as the key.. > > Or.. you can create a single table with user+country as the key. > > Third way is to have only one table with user as the key. For the country > query you can scan across the table and do aggregations. > > The choice will depend on whether these are batch processed queries or real > time. > Amandeep Thanks for your reply. If I have user as key, how would I store multiple records for the same user (as there would be multiple page views from a user). I am thinking I need to couple it with timestamps? userid_timestamp => { } thanks SM
