ubx / start-list

Distributed start list for glider pilots
http://start-list-hrd.appspot.com/?place=grenchen%20gld
3 stars 0 forks source link

Optimize Objectify query #50

Closed ubx closed 12 years ago

ubx commented 13 years ago

Optimize Objectify query to avoid warnings like:

com.google.appengine.api.datastore.QueryResultsSourceImpl logChunkSizeWarning: This query does not have a chunk size set in FetchOptions and has returned over 1000 results. If result sets of this size are common for this query, consider setting a chunk size to improve performance. To disable this warning set the following system property in appengine-web.xml (the value of the property doesn't matter): 'appengine.datastore.disableChunkSizeWarning'

A potential candidate:

Query query = ofy.query(FlightEntry.class).filter("place ==", place).filter("startTimeInMillis >=", dateStart.getTimeInMillis()) .filter("startTimeInMillis <", dateEnd.getTimeInMillis()).order("startTimeInMillis");

.filter("place ==", place) as the last filter?

ubx commented 12 years ago

Done