asolfre / appengine-rest-server

Automatically exported from code.google.com/p/appengine-rest-server
Other
0 stars 0 forks source link

Improvement - query offset, is inefficient at scale #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Please provide any additional information below.

The offset/limit parameters for queries, do not scale well with
large numbers of entities.

A better approach would be to use the cursor capability of queries.

To keep the rest server stateless, that would mean that the cursor
parameter would need to be passed back and forth from the client.

Original issue reported on code.google.com by or...@orser.org on 4 Jun 2012 at 9:49

GoogleCodeExporter commented 9 years ago
i've changed the query support so that it will use cursors by default.  the 
returned offset parameter is now a query cursor (if supported for the given 
query type).  if the query type does not support cursors, the code will fall 
back to the normal offset based queries.  as long as you treat the offset as an 
opaque value, everything should work just fine.  if, for some reason, cursors 
are not desired, explicitly providing offset=0 on the first query will cause 
numeric offsets to be used.  

this is in the trunk and will be in the 1.0.6 release.

Original comment by jahlborn@gmail.com on 6 Jun 2012 at 12:21

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r75.

Original comment by jahlborn@gmail.com on 6 Jun 2012 at 12:23

GoogleCodeExporter commented 9 years ago

Original comment by jahlborn@gmail.com on 6 Jun 2012 at 1:03