valentina string field size questions

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Sep 9 08:08:41 CDT 2008


On 9/9/08 7:52 AM, "Joseph Morgan" <joseph at checkos.com> wrote:

Hi Joseph,

> I have a few questions regarding text field sizes.
> 
> 1. What are the maximum field sizes for the following fields?:
> string
> varchar
> text

It is mentioned in WIKI / KERNEL / ...

Varchar 2044 for UTF16

String -- it seems 64K  -- but be careful here.
    in docs pointed String is fine for FIXED SIZE strings,
    usually <=20-40 chars

Text - unlimited

 
> 2. Should it matter which one I use string, varchar,text?

yes

 
> 3. In vstudio, the what is the unit type for length? IE.
> characters,bytes, kb?

CHARS. 
 
> 4. Is the field length a "place holder" in the database? For example,
> if the length is set to 750 and you have 1000 records the actual disk
> space used is 750X1000?

This is true for STRING field, but not VarChar.

Hey you need read docs :)
All this comparisons are given there.


> Or is only the actual space used for the data occupying that field
> being used?For example,
> the length is set to 750 but only half the space for each field is
> used with 1000 records is it
> 750X1000 or 375 X 1000?
> 
> My reason for asking is I have a table with 100,000+ records with a
> field called "details".
> Most of the records are less than 750 characters long. But some are
> over 2500 characters long.

VarChar has 2044 max.

So almost fine.

So LAZY way is -- use TEXT

More labor but can be more effective way -- use couple of VarChar and TEXT
fields. TEXT field will be used only for strings longer of 2044.


> If the table has 100,000+ records and this field is setup to deal with
> the 2500 characters, the disk
> size may be too big.
> 
> thanks in advance for any help

-- 
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