JDO Keys-only query counts toward Datastore Read instead of Datastore Small

47 views
Skip to first unread message

András Belicza

unread,
Jul 9, 2012, 10:36:01 AM7/9/12
to google-a...@googlegroups.com
When running Keys-only JDO queries, it is counted toward the "Datastore Entity Fetch Ops" instead of "Datastore Key Fetch Ops".

Example:
pm.newQuery( "select key from " + entityClass.getName() + " where date>:1" ).execute( fromDate );

If there are 1000 entities meeting the criteria, the query will return a list having 1000 Keys (not entities). I would expect "Datastore Key Fetch Ops" to be increased by 1000, but instead it stays 0 and "Datastore Entity Fetch Ops" is increased by 1000 (+1 for the query).

This is crucial since Datastore read ops cost 0.7$/Million Ops and Datastore small Ops cost 0.1$/Million Ops.

Am I doing something wrong?

If I run the same query using the low level datastore API (DatastoreService), it is counted toward the Small Ops properly.
Reply all
Reply to author
Forward
0 new messages