Low level API has a method to do this, in JDO/JPA simply select only
key field in your query.

See

http://gae-java-persistence.blogspot.com/2009/10/keys-only-queries.html

(from Max Ross, GAE team) for details.

Regards
Lorenzo

On Jul 21, 5:21 am, TL <twl.e...@gmail.com> wrote:
> I want to run a query and receive a few keys, which I will delete
> afterwards. The problem is that queries return the entire entity,
> unnecessary work for the data store and the client (which is also
> reflected as slower page performance and higher bills).
> All I want from the query is the keys.
>
> In SQL it would be something like
> select t.id from table t where t.column > someValue
>
> Is there a way to get it using the native API or in another way? I
> imagine that JPA will do the same if the underlying libraries can only
> return full records.

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

Reply via email to