I have a system for displaying top scores. Each page shows 10 entries, so the first page shows 1-10, second shows 11-20, etc. Up until now, I've just been loading the entire DB, saving it to an array, and then just displaying the respective elements in that array for each page. But I've realized that, as this DB will potentially have thousands of entries, this can be very inefficient, since the entire DB will be reloaded every time the player refreshes the list. I know I can use the limit parameter to limit the number of entries, but the problem is getting the start entry. Say, for example, the player wants to skip from page 1 to page 30. In order to load the entries for page 30 with loadRange, I need to either load the entire DB (which is out of the question), or know the score of the first object. And in order to find that, I'd need to load the entire DB up until that point. So, I'm looking for a way to load only a specific range of elements, by an index, based not on the values of some variable in the DBObject, but based on the position which it appears in when sorted by the index.
Thanks in advance.