Types of Datastore index
By default, Cloud Datastore automatically predefines an index for each property of each entity kind. These single property indexes are suitable for simple types of queries.
Composite indexes
Composite indexes index multiple property values per indexed entity. Composite indexes support complex queries and are defined in an index configuration file (index.yaml).
Cost Counting for Datastore write
In the current pricing model, inserting a new entity costs
2 write operations for the entity + 2 write operations per index.
here index may be the composite index or built-in index ( single property index).
You can remove composite index using either gcloud tool or appcfgRemove composite Datastore index
To remove composite index just update the index file and run appcfg command with vacuum_index as argumentappcfg.py -A <project-name> vacuum_indexes <directory>
<diretory> : directory that contains the index.yaml file for your project
Notice that this will only remove the composite index ( indices defined in the index.ymal ) file.Remove Property based Datastore index
To remove the index from the individual property you have to remove the index from each and every record in the Datastore.Remove property index |
I don't find another fast and efficient way to remove the index from individual property with existing data
Comments
Post a Comment