agreeing with ryan here that you'll need to do a pair of questions, regardless of whether you do it via a Query or GqlQuery.
however, a better question would be: what are you trying to do, and why do you need the first and last keys? non-relational datastores are generally not geared up for doing counting (thus fetching the "last key"). perhaps there is another way to accomplish your task without doing exactly what you've described. for example, an alternative to querying is to create another type of entity in the datastore that stores the first key and the (current) last key, and update that data structure as you continue to add more applications entities into your datastore. this way you'll have a much shorter query to perform (only one object that contains exactly what you need). just curious... -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Prentice Hall, (c)2007,2001 "Python Fundamentals", Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: wesc+api-at-google-dot-com developer relations :: google app engine @app_engine :: googleappengine.blogspot.com -- 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.