[doc] Maximum size for VarChar

Erik Mueller-Harder lists at praxisworks.com
Fri Aug 8 07:43:49 CDT 2003


Thank you for your previous answers, Ruslan!   Here's one more for you:

The docs say (and I think I helped write this a couple of years ago!), that the max length for VarChar fields is 65,535 bytes (Kernel, page 22).

Would I be right in saying that the real maximum is 65,528 -- and that that's what we should set maxLength to?

I'm figuring it this way:  to achieve a maximum length of approx. 64K, you'd need a page size of 128K (131072 bytes).  Subtract 8 bytes for the page header to get 131064 bytes.  Divide by two strings per page (65532) and subtract 4 bytes overhead per string:  65528.

Is that correct?

I have a field that nearly always will have about 150 bytes in it, but sometimes may have as much as 64K; I'm assuming a large VarChar field is the best way to store it?

Many thanks again,

Erik


More information about the Valentina mailing list