Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ms-Access: any need to have a low size for variable-length text fields

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?

like image 854
CJ7 Avatar asked Jul 21 '10 02:07

CJ7


3 Answers

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.

like image 175
HansUp Avatar answered Oct 18 '22 00:10

HansUp


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.

  • Intermediate, Microsoft JET, MSDN
like image 20
mdma Avatar answered Oct 18 '22 00:10

mdma


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.

like image 3
Albert D. Kallal Avatar answered Oct 18 '22 02:10

Albert D. Kallal