views:

27

answers:

1

I expect the index.yaml file to update with the necessary indices when I run queries in my development environment. It claims that it is updating this file in the dev server log, but the file doesn't actually change. Any idea what might be going on?

Here is the entire index.yaml file:

indexes:

# AUTOGENERATED

# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run.  If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED").  If you want to manage some indexes
# manually, move them above the marker line.  The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.

The log has several of these lines at the points where I would expect it to add a new index:

INFO     2010-06-20 18:56:23,957 dev_appserver_index.py:205] Updating C:\photohuntservice\main\index.yaml

Not sure if it's important, but I'm using version 1.3.4 of the AppEngine SDK.

+3  A: 

Are you certain you're running queries which need composite indexes to be built? Any queries that are on single properties will be served with the default indexes, and won't need index.yaml entries, and any queries that only use equality filters on multiple properties will be executing using a merge-join strategy that doesn't require building custom indexes.

Unless you're getting NeedIndexErrors thrown in production (without a message about the existing indexes not allowing the query to run efficiently enough), your empty index.yaml may be perfectly fine.

Wooble
What I'm getting are long queries when I use GeoModel to do a proximity query. It's not a hard failure, just a slow query. I suspect that missing indices might be to blame since I don't have any. Maybe it's a flaw with GeoModel itself... (My DataStore has a few hundred items in it. No queries should actually be slow.)
Joe Ludwig
@Joe Performance on the dev_appserver isn't representative of performance on the live server - a slow query on the SDK may not be in production. You need to show us an example of the sort of query you're executing for us to tell if it should be generating indexes or not.
Nick Johnson