It may or may not work in your scenario, but if you have a cursor pointing to the start of events after the end date, you can use an end cursor:
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/FetchOptions.html#endCursor(com.google.appengine.api.datastore.Cursor) This tells the query to stop running when it hits this spot in the index. If you combine this with a start cursor, it may be just what you need. The trick, of course, is obtaining this cursor - you'll need to issue a query first, retrieve the cursor, then issue a second query and use this as the limit. On Fri, Aug 13, 2010 at 2:15 PM, dominity <[email protected]> wrote: > Hi, there! > > Currently there is no possibility to use two inequality filters for > data retrieving. > I'm storing events with start/end dates. And I want to retrieve events > by date range. > Currently, I'm retrieving them with query with one filter for start > date, so retrieved events are older than start date. > If there is a lot of stored events, query takes a time. Is there any > possibility to reduce this time? > Any suggestions? > > Best regards, Alexander. > > -- > 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 > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- Ikai Lan Developer Programs Engineer, Google App Engine Blog: http://googleappengine.blogspot.com Twitter: http://twitter.com/app_engine Reddit: http://www.reddit.com/r/appengine -- 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 [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-java?hl=en.
