2 possible ways of persisting large strings in the Google Datastore are Text and Blob data types.
From a storage consumption perspective, which of the 2 is recommended? Same question from a protobuf serialization and deserialization perspective.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no significant performance difference between the two – just use whichever one best fits your data.
BlobPropertyshould be used to store binary data (e.g., str objects) whileTextPropertyshould be used to store any textual data (e.g.,unicodeorstrobjects). Note that if you store astrin aTextProperty, it must only contain ASCII bytes (less than hex 80 or decimal 128) (unlikeBlobProperty).Both of these properties are derived from
UnindexedPropertyas you can see in the source.Here is a sample app which demonstrates that there is no difference in storage overhead for these ASCII or UTF-8 strings:
And here is the output: