Google Datastore w/ JDO: Access Times?
Posted
by Bosh
on Stack Overflow
See other posts from Stack Overflow
or by Bosh
Published on 2010-04-18T00:14:16Z
Indexed on
2010/04/18
0:23 UTC
Read the original article
Hit count: 802
I'm hitting what appears (to me) strange behavior when I pull data from the google datastore over JDO. In particular, the query executes quickly (say 100 ms), but finding the size of the resulting List<> takes about one second! Indeed, whatever operation I try to perform on the resulting list takes about a second. Has anybody seen this behavior? Is it expected? Unusual? Any way around it?
PersistenceManager pm = PMF.getPersistenceManager();
Query q = pm.newQuery("select from " + Person.class.getName() +" order by key limit 1000 ");
System.out.println("getting all at " + System.currentTimeMillis());
mcs = (List<Med>) q.execute();
System.out.println("got all at " + System.currentTimeMillis());
int size = mcs.size();
System.out.println("size was " + size + " at " + System.currentTimeMillis());
getting all at 1271549139441
got all at 1271549139578
size was 850 at 1271549141071
-B
© Stack Overflow or respective owner