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 google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to