VarChar

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Sep 11 18:12:00 CDT 2004


On 9/11/04 4:26 PM, "olivier" <vidal_olivier at yahoo.fr> wrote:

Hi Oliver,

> I know that the question was already put in the list but I saw
> contradictory answers.
> 
> I have a string field of 100 bytes.
> But many recordings have only 15-40 bytes.
> 
> As I have 3 000 000 of the recordings, the database is too important on the
> hard disk. I wanted to use a varchar on the place of the string, to reduce the
> size.
> 
> But the documentation indicates :
> "MaxLenghth : When using a varchar field, there is no benefit (in terms
> of speed OR DISK SPACE) to using a value of less than 504 bytes because
> it stores characters in logical pages"

> It means that with a varchar, my string of 100 bytes will take really
> 504 bytes ?!

NO.

It says that if you will make VarChar[100] it will be the same by
effectiveness as VarChar[504]

And in both case the string in 15 chars will eat on disk 15 + 8 bytes.


> Or it means that that I can put for example 5 fields of 95 bytes +
> header 4 = 5 X 99 = 495 + header 8 bytes = 504 bytes ?

Also no.

> Random access are much slower with a varchar than with a string?

No!!!

That was surprise for mew few years ago, but VarChar fields work much faster
of String.

> I saw on the list which it has had many problems with varchar there.
> Now, varchar works perfectly?

They still can get corruptions in hard cases.
String have less chances because it is of fixed size column.
VarChar is much more complex structure.

But in general we do not have other way,
We must use VarChars.


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