1
votes

In the App Engine documentation (https://cloud.google.com/appengine/docs/java/datastore/entities#Java_Properties_and_value_types) it says that Integer value types are: "Stored as long integer, then converted to the field type."

I'm assuming that using a smaller data type (a Short vs. a Long for instance) in my Entities has no effect on space. Is this correct?

1

1 Answers

3
votes

You are correct. All integers are stored internally as Longs. Actually, there is a substantial overhead for each entity and property (because of keys and indexes), so a few bytes difference is meaningless anyway.

On a positive side, think how many Longs fit into a single HD movie. You have to have an extremely large data set before a few bytes per entity start to matter cost-wise.