Option 1 sounds fine. That is how python implements a WHERE a IN (1...n). It will execute up to 30 queries. How many do you expect? And how many results do you expect for each individual query?
On Aug 21, 11:15 am, Ray Li <ray.lee....@gmail.com> wrote: > Hi, > > I have a query filter on an entity Person that person.name be in listA > and person.country in listB. As far as I can see, there're 2 options: > 1. Create a query "select t from Person t where t.name = :listAElement > and t.country = :listBElement" and run it listA.size() * listB.size() > times, then combine the result sets. > 2. Create a query "select t from Person t where t.name =:listAElement" > and run it once, then for each entity in the resultset, check if its > country is in listB. > > For option 1, I am not sure about querying the datastore too many > times will case a serious performance issue. > > For option 2, I may have to get all results back, may be several > several thousands, and this may be not achievable, is it? > > Any help is highly appreciated. > > Thanks, > Ray --~--~---------~--~----~------------~-------~--~----~ 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 google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~----------~----~----~----~------~----~------~--~---