开发者

How to know which indexes are always used [duplicate]

This question already has answers here: Closed 11 years ago.

开发者_如何学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:

  1. clear out index.yaml on your local development copy of the app
  2. 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)
  3. upload the new index.yaml, which is now complete since the development server automatically adds any index that it uses to the file
  4. 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]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜