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!

What's the optimal size for a varchar2

526041Aug 1 2006 — edited Aug 1 2006
I have a table that contains over 60k rows that will grow by approx 500 rows/day. One of the columns stores a value and varchar2 was sufficient for version 1. Version 2 of the application will store a different type of value and will need up to 50 chars in the same value column. Increasing the size of the column from 15 to 50 is easy enough but is this the most efficient way to go? Once a value has been entered, it's unlikely to change. How much space is wasted if 99% of the rows use only 15 chars in a varchar2(50) column. I could join w/ another table for the larger values but this will make the app tier code a little more complicated.

Basically, how much space is wasted if you store only 15 bytes in a varchar2(50) field? Is 50 bytes always allocated for each varchar2(50) regardless of the space actually used

thanks,
-john
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 29 2006
Added on Aug 1 2006
3 comments
1,315 views