|
-----Original Message----- > From: midrange-l-bounces@xxxxxxxxxxxx / d.bocian@xxxxxxxxxxx > > Hi. We are trying to use variable length fields in a file, but > so far there doesn't seem to be any advantage to them. > <snip> Compare using thousands of records. Even database files with no records take up at least 32768 bytes; after all, you've got the overhead to contend with. Variable length fields are only worth the hassle in a scenario whereby you have a field that you expect to be, for example, 20 characters max 99% of the time. The other 1%, a user could have a legitimate need to enter 300 characters. Instead of defining the field with a fixed length of 300 characters, define it with varlen(20). Test that with 10000 records, 9900 of them with a value in that field of 20 characters or less, the other 100 records fill with a value greater than 20 characters in length. I'd be curious to know the results. db
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.