How to know which indexes are always used [duplicate]
开发者_如何学PythonPossible Duplicate:
Google App Engine - Tracking which indexes are used
I have an app with several indexes, i would like clean all indexes not used, to get better performance.
Now I have a index.yaml with just indexes needed but i'm not really sure it is right because sometimes, datastore needs composite indexes or maybe i have make a mistake.
The real question is how to know wich indexes are used?
The big problem is if i remove an index used, the time to remove it is very, ...very long and it is same to build.
The process used to be:
- clear out index.yaml on your local development copy of the app
- run a covering set of tests on the SDK (doesn't have to cover every line of code, just every query, which makes it easier to write these tests than to write a set of unit tests for the components of the app)
- upload the new index.yaml, which is now complete since the development server automatically adds any index that it uses to the file
- vacuum indexes.
It's possible this has changed. I haven't used GAE for a while and the developers have a habit of introducing new, better ways of doing things. But the old ways pretty much always continue to work.
[Edit: found a dupe, so assuming this answer is still the state of the art, go upvote Nick Johnson instead of me]
精彩评论