Google App Engine Application Index Cost

From what I understand, App Engine indexes are expensive, both in terms of increasing the total storage capacity and slowing down your records.

But are indexes only when they are really used in queries and explicitly defined in index.yaml? Or are properties, such as StringProperty, worth more than their non-indexed counterpart (e.g. TextProperty) just existing, although they are not used in index.yaml?

+3
source share
2 answers

There are built-in / default indexes that will contribute to overhead, even if you do not explicitly define any additional indexes in your index.yaml file. Therefore, you should use TextPropertyinstead StringPropertyfor the field if you know that you will not need to filter in this field.

Details of these implicit indexes are provided in the article How Objects and Indexes Are Stored .

+3
source

You can also set indexed = False for properties that you do not want to index:

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

+7
source

Source: https://habr.com/ru/post/1755849/


All Articles