Hi Everyone,
A little challenge for the day - If I have many millions of an object
persisted in the datastore that have an two properties: a long value
and a date, and I want to query for a subset of those object that have
the same long value, and a date that falls between a start and end
date range.
This is how i'm doing it:
q = pm.newQuery(RecordedValue.class,
"pointFK== k && timestamp >= sd && timestamp <=
ed");
q.declareImports("import java.util.Date");
args = new HashMap<String, Object>();
args.put("k", point.getId());
args.put("sd", startDate);
args.put("ed", endDate);
q.declareParameters("String k, Date sd, Date
ed");
q.setOrdering("timestamp descending");
data = (List<RecordedValue>) q
.executeWithMap(args);
My users are experiencing "hard deadline exceeded errors" when trying
to pull this data. I was wondering if there was a better, more magical
way to do this query, or can i improve things with a better index
definition in my datastore-indexes file.
Thanks!
Ben
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.