In attempting to determine the impact of using Text or LongTextArea types in an object, I was surprised by the values displayed in the Setup > Storage Usage page: the sizes for each object type were equal.
To test each type I created 3 Objects :
- ShortText : an object that contains a single custom field of type Text (255)
- LongTextAreaObject : an object that contains a single field of type LongTextArea(131072)
- LongTextAreaObjectEmpty : an object that is exactly the same as LongTextAreaObject that I am using as a control object where I will only populate the name and nothing else
Using DataLoader the following values were loaded (9999 records for each object type):
- ShortText had a Name field set to 'a' and the custom Text field set to a concatenated value of 255 'a' chars
- LongTextAreaObject had a Name field set to 'a' and the custom LongTextArea field set to a concatenated value of 65470 'a' chars
- LongTextAreaObjectEmpty had a Name field set to 'a' and no values in the custom LongTextArea field
I would have expected that the ShortText object containing the Text type field would have been smaller due to the amount of data being stored.
Is there an explanation of how the 19.5MB figure is reached? Are Text and LongTextArea some how stored in the same data type under the covers e.g. a CLOB (which would be an odd decision for a 255 length text field)?