Default maximal length for VarChar Re: VChar vs VText

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Dec 8 17:27:11 CST 2005


On 12/8/05 4:21 PM, "Ed Kleban" <Ed at Kleban.com> wrote:

>> For field with single byte encoding, you will be able use VarChar[2044].
> 
> Ok, let's do the math one more time.  I suspect the number 2044 may be
> wrong.
> 
> We have a 4096 byte page less (8-byte page header) less (4 byte
> string-length-header for each of 2 strings)
>   = 4096 - 8 - (4 * 2)  = 4096 - 16
>   = 4080 bytes for storage of actual string data,
>   or 4080 / 2 = 2040 maximum storage bytes for each of two strings
>   which in UTF-16 with two bytes per string
>     = max 1020 characters per string.
> 
> Correct?  Or did I get it wrong?

Something wrong.

Aha, I think you use info from 1.x docs.

In v2 VarChar page do not have header at all.
So 

    4096 - (4+4) = 4088.

    4088 / 2 = 2044.

    2044 / 2 = 1022.



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list