Guys I think cursors are the best choice for paging ... It is also
safe to send a cursor to the client and this is exactly what i am
doing ... I am saving all cursors on the client in an ArrayList and
using them to page forward and backward ... of coarse u have to start
by page 1 and move forward
For most queries the process goes something like this:
Index Scan - Fetch Entity - Send to user
For any query with a sort order or inequality filter on any property
other than __key__ we are still actually fetching the entity in the
datastore, so the only savings is the serialization and
This isn't a bad solution, but it has several problems:
- It doesn't scale
- Cache could have holes. I guess then you could grab a query and
scroll though the first 20 pages to fill out the cache. You could
actually start at the highest cursor before the requested page and
page forward to fill
To achieve this I am saving all corsors (in an ArrayListString) on
the Client and reusing them for getting bachward pages :) ... this
works! What do u think?
On 2 Apr., 21:57, Arny arny...@googlemail.com wrote:
Hi,
Is there a way to get acursorto pagebackto a previous page?
If not, whats the
Offset doesn't fetch data - it does an index scan. Going to the 10,000th
result using offset will require us to pass 10,000 results first in our
index, but we won't be retrieving those objects. Here's a bit of a
simplification of indexes, entities and how these queries work. As you know,
Bigtable
We get a list of Keys back and figure out keys.
I just realized how confusing this is - we get a list of INDEX keys back.
These don't have any value; we do all storage inside the Key. We extract the
keys of the Entity from the returned Index keys and do a query.
On Tue, Apr 6, 2010 at 11:42 AM,
But isn't it getting slower and slower on higher pages, since it
fetches ALL data (according to docs) and discards the offset value?
So Range(0,10) is faster than Range(1,10) ?
Anyone did some performance tests?
Regards
On Apr 3, 7:49 am, John Patterson jdpatter...@gmail.com wrote:
Probably
How many pages do your users really want to see? Even Google search
sets a limit - I think 1000 results. Although the number of results
can exceed 1000 the offset is still limited so you would need to
filter out results to continue past 1K. That would be slow.
If you really need to