In an Ms-Access MDB, will it save disk space to limit the size of variable-length text fields?
eg. If I have a variable-length Text
field of size 20
and all the actual values of the field are under 10
characters, am I wasting space?
Would it be better to set the size of the field to 10
, or does it not make any difference?
If I have a variable-length Text field of size 20 and all the actual values of the field are under 10 characters, am I wasting space?
No.
Would it be better to set the size of the field to 10, or does it not make any difference?
It would be better to set 10 as the field size limit if values longer than 10 characters are unacceptable. If it's OK for a user to enter values between 11 and 20 characters, leave the limit at 20. The disk space use is a non-issue in this situation.
Although it's not explicitly stated, I think you're asking is there a difference regarding data storage with the limit on variable length strings: There will be no difference using larger or smaller limits. From MSDN, discussing the TEXT data types for JET (The db engine in Access)
In general, text fields can be up to 255 characters, [...] In addition, unused portions of text fields are not reserved in memory.
The fields are stored as variable length, and thus setting the size as 255, or 10 will not reduce or change the size of the data file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With