Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Database size
Message
From
21/05/1999 12:05:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
21/05/1999 11:52:42
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00221419
Message ID:
00221430
Views:
14
>ok.. we are very hard pressed for space on a database that has to fit onto a single cd. we have played with changing large char fields to memo fields and in some cases it saves space, other times it seems to make the database bigger. Does a memo field with say 10 char take up more space than say a char field with 10 char.. is there a rule of thumb as to how much space a memo field will take up (empty one)

Memo size is in relation with "set blocksize". Default is 64 which means a single char would allocate 64 bytes and 65 bytes 128 bytes. If you specify a value between 1-32 then it's worse and allocation would be Value*512. To save space minimum could be 33+4(memo alloaction on dbf). So in theory a memo with 10 chars take more space than a 10 char Character type. OTOH an unused 10 Chars Character still allocates 10 chars space vs same memo holds 4 (an integer indicating block id).
To save space you could do some tricks however. You could ie: compress memo contents using RLL algorithm (one is ready as a Fox function at www.fastwrite.com) and decompress to memory when it has to be shown. Another could be holding references of file position and length to an external file holding all those static memo contents (on CD they'll be RO forever ?).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform