Google Datastore will have new pricing effective July 1st (https://cloud.google.com/datastore/docs/pricing) and I having trouble understanding how the changes will effect me.
My KIND does have a structure to it. My kind is called MESSAGES
and it looks like this for the every entity:
ID
FROM
TO
MESSAGE
DATE_CREATED
MISC1
MISC2
I have an index on ID
, FROM
, TO
, DATE_CREATED
, MISC1
, and MISC2
. With the new pricing:
What will be the cost of inserting a new entity into this kind?
If I run a query to get all the attributes and it returns 10 entities what is the cost of the query?
If I run a projection query to get all the attributes except MISC1 and MISC2 and it returns 10 entities what is the cost of the query?
If I update a entity with all these indexes what will be the cost?
The old pricing is based primarily on how many index you have, but it seems the new prices are not based on indexes at all. All the documentation on understanding the costs of read and writes are shown with indexes, so it is confusing how it applies without indexes in the pricing model. I would like know how much these 4 types of operations would cost in terms of read/write/small ops.
Writing a new Entity
In the current pricing model, inserting a new entity costs 2 write operations for the entity + 2 write operations per index.
So in your example, with 6 indexes properties it would be:
- 2 + 2 * 6 = 8 write operations
- The effective price would be (8 * $0.06) per 100K entities written
- Summary current: $0.48/100K
The new pricing just counts the entities written:
Regular Queries
In the current model you are charged the number of entities returned + 1
- 11 read operations @ $0.06/100K
In the new pricing model, you only get charged the number entities
- 10 entity reads @ $0.06/100K
Projection Queries
Reading projections count as 'Small Ops' and are free. The query itself costs 1 read though - this stays the same in both current and new pricing models.
Updating Entities
In the current pricing model, updating an new entity costs 1 write operation for the entity + 4 write operations per index.
So in your example, with 6 indexes properties it would be:
- 1 + 4 * 6 = 25 write operations
- The effective price would be (25 * $0.06) per 100K entities written
- Summary current: $1.50/100K
The new pricing just counts the entities written:
Isn't the new one simpler? it's only based on the number of entities, ignore the indexes. You can see the number and explanation here https://cloudplatform.googleblog.com/2016/03/Google-Cloud-Datastore-simplifies-pricing-cuts-cost-dramatically-for-most-use-cases.html.