[google-appengine] How to write optimal queries?

2011-07-07 Thread Pol
Hi, Assuming the app runs on an HR database and that the number of indexes is not a problem: Say that because of the data model, these queries are equivalent (i.e. return the exact same results), which one should be used to get the best performance? query = db.GqlQuery("SELECT * FROM Photo WHERE

Re: [google-appengine] How to write optimal queries?

2011-07-07 Thread Ikai Lan (Google)
Ancestor queries don't add significant overhead, so I'm not going to consider that factor. As far as other queries go, in general fewer indexed mean better performance if you are doing zigzag join. However - if an index contains a small number of results, obviously the query will return faster bec