varchar2 and clob datatypes - internal
266367Oct 27 2003 — edited Oct 27 2003Can anyone tell me how varchar2 and clob datatypes are handled internally? Are varchar2's pre-allocated to the maximum size? Or, does the memory get allocated/deallocated every time a value is set? If I set a varchar2 to a string that is 4000 bytes long and then later set it to a string that is 1 byte long does the original 4000 bytes get deallocated or is it being wasted? Does a varchar2 with a max length of 4000 have any drawbacks over one with a smaller max length?
My table will have a large number of rows and I want to choose my datatypes and sizes wisely so that I do not waste memory unnecessarily.
I have the same questions for the CLOB datatype.
thanks