On Mar 29, 6:01 pm, José Moreira <matrixowns...@gmail.com> wrote:
> but both take too long (7/8 seconds at least). Should i refactor to
> GQL for example and do 2 SELECT's? One for the 1st and another for the
> 2nd?

yes. it doesn't matter whether you use GQL or programmatic queries,
but you definitely want to do two separate queries. your current
designs will take longer and longer as your result set grows, because
the end key query has to scan the entire dataset, since offset queries
still always have to start at the beginning of the result set.

instead, switch the end key query to sort descending:

q = self.model.all(keys_only=True).order('-__key__')
endKey = q.get()

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to