As explained in the C API base data types page, for dynamic fields, such as
string, vector, sequence, blob
oroptional struct
fields, a reference pointer is stored in the data layout for the objects of this class, and the actual object data is stored separately and retrieved via this reference address when the object is accessed. Especially for persistent databases, this can lead to performance considerations as additional disk IO is incurred.For example, it can be expected that execution using short
blob
fields will be slower than the performance of fixed length character fields due to the fact that the data is stored separately. For this reason, it is recommended to useblob
fields only for large data fields (greater than 1 Kb). When a field is not intended to be used in indexes and its data size is less than 64 Kb it is recommended to use thestring
data type. Alternatively, particularly if a field containing binary data is intended to be indexed, thebinary
orvarbinary
data type should be used.To display binary data stored in
blob
orstring
fields in query results, normally base64 encoding is recommended.Examples of binary data usage can be found in the Binary Data section of the eXtremeSQL Structures, Arrays and Strings in C++ page.