Both dev and live server - the screenshots above are from dev, but live behaves the same way...
I've changed my code now to do multiple async EQUALs queries instead of the one IN query. I've also made it cache the keys-only results of each EQUALs query to memcache, so it can save work if it's already done a sector before. This has sped it up a huge amount (avg 300ms per request down to well under 100ms), so it seems to be the right way to do it. If everything is in memcache already, then it has a cost of 0 as well now, which is nice... If you're curious as to what I'm using it for, it's a geohash style map for an experimental game... basically Google maps on a fake map. You can play around with an early version of it over here: http://2.gloopsh.appspot.com/Admin.html#com.rc.gloopsh.admin.AdminWorldMap$AdminWorldMapPlace Left click+drag to move the map around, mousewheel to zoom in and out of the map. You can see it loading the sectors as you scroll to them, which was running the IN query across each sector. -- Thanks Johan, but I don't think there is any real defect here - 'IN' does work as documented - it's just not very useful as currently implemented. Instead of being 'IN' as in other DBs, it's just newquery(EQUALS) or newquery(EQUALS) or ... Obviously it's a pretty bad idea to use those kind of queries! Most of AppEngine DS tries to stop you from making bad queries that don't perform well, so it's just a bit out of place and I'm sure it has blindsided a lot of people so far. On Saturday, January 5, 2013 2:37:28 PM UTC+2, alex wrote: > > are you running this on dev or production server? > > > On Sat, Jan 5, 2013 at 12:04 PM, Ryan Chazen <[email protected]<javascript:> > > wrote: > >> >> <https://lh3.googleusercontent.com/pcMTiy_-SDxzfHNk178ORXaVoPB0GzQ6eoAGZ4nFsBLUqZi0XNCzFWLKx0xcttb6mA=s1600> >> Ouch ouch, it's even worse than expected. I ran an query with an IN >> filter with the same value repeated. eg IN[0,0,0,0,0,0,0,0,0,0,0] - The >> query runs completely in serial doing an independent query for each of the >> 0s. You are charged for the same entity returned multiple times, and the >> entity is returned to you multiple times even though it's obviously the >> same entity. >> >> The IN filter should definitely be marked as deprecated in the SDK docs, >> and there should be a large warning against using it - it is ALWAYS better >> to use the async datastore to create multiple queries with an EQUALs filter >> - it will cost exactly the same, return the same data, and be far faster as >> it runs in parallel. The whole IN filter seems like a "user trap" on >> Google's part - at the minimum, the IN query should be changed to run in >> parallel! >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/google-appengine/-/kJ4oHDPjEPoJ. >> >> To post to this group, send email to >> [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/google-appengine?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/p9VQ_SFjEbAJ. 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.
