on 12/27/01 1:49, Christian Schmitz at support /at/ monkeybreadsoftware .D.O.T de wrote:
>>> Even if I know that each of those fields can't possibly be bigger than 32 >>> characters? Which leads me to another question, does the size of the >>> varchar matter at all (as I assume you just use 4 bytes to keep the >>> length) >> >> Yes, please look into Valentina kerel.pdf
BTW, Tuviah, more info:
Yes, VarChar store length of string, you are right.
Yes, VarChar size still play important role -- it regulate size of page for file. When you say 504 bytes, page is 1024 bytes. For VarChar[10000] page is 20KB. Sinse page is smallest atom to read / write from disk size of page will affect performance.
> Just an idea: > would a pstring type save bytes? > > Instead of 4 bytes for length use one byte for varchars smaller than 256 > bytes. Would that save CPU time or disk space?
1) I really have made a mistake and now for VarChar is used LONG (4 bytes) to keep length. Since there is limit on max length 65535 it was enough to use 2 bytes only.
In one of future version I will redo this. This really can give benefit if we have many empty strings.
2) Yes you are right, that for small VarChar <256 bytes, it is possible to use ONE byte. Benefit will be in range 1/256 .. 2.
May be later I will do this.
-- Best regards, Ruslan Zasukhin
------------------------- Paradigma.
e-mail: ruslan@paradigmasoft.com web : http://www.paradigmasoft.com
To subscribe to the Valentina mail list send a letter to valentina-on /at/ lists .D.O.T macserve.net ©2001 Ruslan Zasukhin |