strategies for changing file keys


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Bob A on April 26, 2013 at 06:06:54:

Have to expand the keys for a few (4) of our largest (1 million+ rows) reference files

one thought was to go the route of "extended keyed files", put the long key at the end, expand the file by copying to a longer record, copying the key from the beginning of the record to the end of the record, and then re-compile about 200 programs with new key length

second idea was to put a suffix field with the extension of the key in the record trailer, make the change at the point of each INQUIRE or INSERT to concatenate the existing key and the "suffix". this seemed to have an advantage that while the existing key is fine, I'd be concatenating a blank suffix and all would work fine. It is only when the new longer reference items start coming in that I'd have to put the first 16 bytes into the existing field and the next 10 or so into the suffix field.

My preliminary analysis indicates that while the new expanded data elements (which are keys) appear in many files, mostly they are passing thru. The actual I/O against the reference files for which the keys are changing is a fraction (probably about 40 programs)

My question arises because I can't guage the two options against each other. putting the entire key at the end seems a little goofy, but after I do this a lot of the "heavy lifting" is borne by COMET file i/o since the Key name stays the same and, once all is loaded, it's transparent. The main thing is that while testing, I'd have to keep re-loading the biggest files I have to move the keys.... when I was getting rid of QIC programs and IMAGE files every testing cycle became very, VERY tedious.

the other way means a somewhat smaller file and since some files have all 3 keys, this could mean some reduction in backup files later and refresh times during testing. additionally, I don't have to do any reloading of the file during testing, just padding on the end with blanks, which is easy with COMETEX (at least, I hope it would easily blank-pad)

The accumulated wisdom, and especially any cautionary tales are welcomed from the assembled!

thanx!


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]