It will only suggest better indexes in some cases (specifically the cases where the same property was repeated in multiple equality filters, e. g. WHERE tag=:1 AND tag=:2 ORDER BY date)
On Wed, Sep 28, 2011 at 1:53 PM, jay <[email protected]> wrote: > Thanks for the reply Jason. > > So you are saying that the automatic index creation will simply work > more efficiently now? Is this documented somewhere? > > On Sep 27, 1:51 pm, Jason Collins <[email protected]> wrote: > > Basically, in the past, if you had a query like this: > > > > query = MyEntity.all().filter('attribute1 =', > > 'foo').filter('attribute2 =', 'bar').filter('attribute3 =', > > 'baz').order('-attribute4) > > > > you'd need an index like this: > > > > - kind: MyEntity > > properties: > > - name: attribute1 > > - name: attribute2 > > - name: attribute3 > > - name: attribute4 > > direction: desc > > > > Call this an optimal index. > > > > Now, the query engine is able to make due with non-optimal indexes; in > > some cases you may not even need a custom composite index at all. > > Fewer composite indexes means fewer datastore write operations (and > > thus $$), but you will likely trade off performance (and thus > > increased instance-hours, unless you are multi-threaded) as the query > > engine needs to walk through more potential matches when using non- > > optimal indexes. > > > > A good starting point is to remove all of your indexes from index.yaml > > (on dev, of course!) and see what dev_appserver makes for suggestions. > > > > j > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" 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?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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?hl=en.
