Forum BigDB Combining, LoadKey and LoadRange

Discussion and help relating to the PlayerIO database solution, BigDB.

Combining, LoadKey and LoadRange

Postby Thijs » April 15th, 2013, 6:59 pm

Hey, is it possible to Load a set of Keys that are filtered and limited to the amount of results? I want to do this because i have a list of friend ids and i want to retrieve the 10 highest scores, but i dont want to load every friend to sort it out on the client side.
Thijs
 
Posts: 2
Joined: February 25th, 2013, 10:28 am

Re: Combining, LoadKey and LoadRange

Postby Henrik » April 15th, 2013, 7:03 pm

No, that is not possible, LoadRange only works over indexes. And I suspect that in your case, it's not possible to make an index that covers it.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Combining, LoadKey and LoadRange

Postby Thijs » April 15th, 2013, 7:49 pm

Any ideas on how/if i could create something similar without destroying my data limit?
Thijs
 
Posts: 2
Joined: February 25th, 2013, 10:28 am

Re: Combining, LoadKey and LoadRange

Postby Henrik » April 15th, 2013, 8:42 pm

You could keep an extra table that only contains objects with a single property that is the score, and the same keys as your main table. That way you can do a full LoadKeys from the small table, sort them in your game, and the load the actual top-10 objects.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to BigDB