开发者

Google App Engine index costs

From what I've understood, App Engine indexes are costly both in terms of increased overall storage size and by slowing down your writes.

But do indexes only cost when they're actually used in queries and are explicitly defined in index.yaml? Or do properties such as StringProperty cost more than their non-indexed counterpart (e.g. TextProperty) simply by existing, even though they're not used in inde开发者_如何学运维x.yaml?


You could also set indexed=False for properties which you don't want indexed:

http://code.google.com/appengine/docs/python/datastore/propertyclass.html#Property


There are built-in/default indices which would contribute overhead even if you don't explicitly define any additional indices in your index.yaml file. Thus you should use TextProperty instead of StringProperty for a field if you know you will never need to filter on that field.

Details on these implicit indices are provided by the article How Entities and Indices are Stored.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜