UTF8 storage // VarChar in 2.0 raise to 2000

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Sep 15 19:33:21 CDT 2004


On 9/15/04 4:47 PM, "Erik Mueller-Harder"
<valentina-list at vermontsoftworks.com> wrote:

> Yes, I do understand that my space usage in text fields will increase
> when I store certain characters, and I understand that using multi-byte
> characters in VarChar and String fields uses their available space more
> quickly than using single-byte characters.

> In the case of VarChar, I'm
> not terribly concerned:  I define almost all VarChar fields as 504
> bytes even in situations where I expect the average field to be only 25
> or 30 characters, since that definition doesn't cost me anything and
> gains me flexibility.

Absolutely right Erik !

And I have exclusive news for you! :-)

** since in Valentina 2.0 we use in the disk files pages with minimum 4KB
size, we get that minimal VarChar size should be 2000 (little more actually)

So with such size of VarChar in most cases
    the average and even long strings (as URLs) will fit.


> If a half-dozen (or even *all*!) of those
> characters are multi-byte -- no difference, even in UTF8.
> Not a problem! 

>  All I have to do is remember to "round up" if I'm ever on the
> fence about how much space to allocate (something I'm likely to do
> anyway).

Correct Erik!


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list