In DB2 Database, How to find out the actual storage size of data in varchar column? -
i new db2, , looking function memory_size(column_name) return number of bytes occupied column of particular row.
example: having column named 'address' of varchar(50) datatype & data stored 'fountain street, zip-12345', function should return memory occupied these 26 characters, not total column size nor length of data.
thank you!
you can find precision of column, via catalog (length query database catalog). however, real storage size vary.
you cannot infer like
cardinality * (leght(column1) + lenght(column2) + ...) = occupied storage
there many other facts affect storage.
also, title of question storage size (it seems tablespace -> container), in body talking memory (bufferpool) , things different in databases.
what mean "memory occupied"? column precision or storage usage?