Skip to content Skip to sidebar Skip to footer

Appengine Backreferences - Need Composite Index?

I have a query that is very recently starting to throw: 'The built-in indices are not efficient enough for this query and your data. Please add a composite index for this query.'

Solution 1:

If you run all relevant queries on your local SDK, it should generate all needed indices (in index.yaml) and the recommended policy is not to edit index.yaml yourself but rather to let the local SDK do it for you. If the SDK is not generating all needed indices, as long of course as you do exercise all relevant code paths in your local testing!, you should open a bug for it in the App Engine tracker here (after checking that there isn't already a bug report for this problem, of course).

Solution 2:

The backreferences actually just construct a query that's filtered on the reference property, so by adding another filter you have a 2-filter query.

Your compsite index would look something like:

-kind:Voteproperties:-name:your_reference_property_name-name:directiondirection:desc

Post a Comment for "Appengine Backreferences - Need Composite Index?"