On Fri, Jul 15, 2011 at 12:25 AM, Alexandru Farcaş <
alex.far...@expert-group.biz> wrote:

> Hi Alfred,
>
> Thanks for clarification. I also have 2 questions:
>
> 1. For this query:
> SELECT * FROM Model WHERE list = :1 AND list =:2 AND list=:3 AND string :=4
>  ORDER BY date DESC
> will be enough this index?
>
> - kind: Model
>   properties:
>   - name: list
>   - name: string
>   - name: date
>     direction: desc
>
>

Yes. This is the index the SDK will now suggest.


> 2. After I create this index (or indexes) I will still receive this
> exceptions?
>
>
> com.google.appengine.api.datastore.DatastoreNeedIndexException >>
> The built-in indices are not efficient enough for this query and your data. 
> Please add a composite index for this query..  An index is missing but we are 
> unable to tell you which one due to a bug in the App Engine SDK.  If your 
> query only contains equality filters you most likely need a composite index 
> on all the properties referenced in those filters.
>
>
>
It is possible. This means that there are lots of results that match each
filter and no results that match all filters (in the first 10k results). If
you see this, adding the following exploding index should help a great deal:

- kind: Model
  properties:
  - name: list
  - name: list
  - name: string
  - name: date

We plan on removing this exception in the future, but this won't improve
the efficiency of the query (the only thing that will do that is adding
indexes like this).

--Alex
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/cHCKy8QEXw0J.
>
> 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.
>

-- 
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.

Reply via email to