It seems like what you are needing is a lot what the Yammer guys needed for their streamie application. They have a video here: http://vimeo.com/21598799 about how they modeled their data. It might be pretty helpful for your application. If not, no harm done, you still get to watch a video from some pretty smart people!
Hope it helps, Jared On Wed, May 11, 2011 at 12:39 PM, alexeypro <m...@alexeypro.com> wrote: > I have a need to keep "notifications" for "users", where each user has > folders "a", "b" and "c". Also every note has "read" status > Original thought was to create bucket "notifications" which will have the > key user_id, and the value will be JSON object in some structure like this: > { > user_id: "3ds78df7df8d7f8df7", > folder: "a", > read: 0, > note: "my note here", > timestamp: 18298329329 > } > I am using Riak Search, so say, if I need to find all unread notes in > folder > "a" for user_id "3ds78df7df8d7f8df7" I am doing: > > select?q=.. > > user_id:3ds78df7df8d7f8df7 AND read:0 > > This works ugly slow -- takes about 12 secs for my case with only 5mln of > records bringing 5 results back. > My next idea was to create buckets per every user. Say user > "3ds78df7df8d7f8df7" will get bucket: "3ds78df7df8d7f8df7_notes" and we > search within it, which should be faster. > > Please advise! > > -- > View this message in context: > http://riak-users.197444.n3.nabble.com/Millions-of-buckets-tp2928567p2928567.html > Sent from the Riak Users mailing list archive at Nabble.com. > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com