Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

varchar2 and clob datatypes - internal

266367Oct 27 2003 — edited Oct 27 2003
Can 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 24 2003
Added on Oct 27 2003
4 comments
134 views