Oh PS on your other point, doing all the inserts at once isn't going to make any difference. Each time you change the length of ANY attribute in a record, the system picks up the entire record, and rewrites it again at the end of its group. Thus shifting everything else in the group forward. That's the nature of hashed groups.
Some vendors, IIRC, allowed the record to stay in place if it was the exact same size or *shorter* (and padding out the trailing FD's) but that was probably a mistake anyway since it kept TMI in the runtime code for that section instead of just shifting it off. At any rate, the files can be *walked* you know, you don't have to guess, you can actually see them in action by byte-parsing them on the fly. -----Original Message----- From: Wols Lists <antli...@youngman.org.uk> To: u2-users <u2-users@listserver.u2ug.org> Sent: Fri, Jun 1, 2012 8:30 am Subject: Re: [U2] Monthly Multivalue Inserts and Speed On 01/06/12 15:33, Israel, John R. wrote: If you are using dynamic arrays, switch to dimensioned arrays. You will be mazed at the performance increase. John nd going by what you've said, what I would do - MAKE SURE THIS IS OCUMENTED IN THE CODE - is undersize the array with a DIM ARRAY(30) I'm used to Pr1me-style arrays, so this will stick the first 30 fields n the first 30 elements, and dump what's left in element 0. (If you use ick-style arrays you'll need to DIM (31) and they'll go in element 31). That way, you get all the benefit of working with your first 30 fields ice and fast, but you don't get hammered on read and write with reaking all the other fields out. Did I say make sure it's documented? Other programmers can get a nasty urprise if they don't realise that's what you've done. btw, I guess you're on UD? My experience is UV, but I think the BASIC is retty much the same even at that level? Cheers, ol > -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] n Behalf Of Dave Laansma Sent: Friday, June 01, 2012 10:30 AM To: U2-Users@listserver.u2ug.org Subject: [U2] Monthly Multivalue Inserts and Speed I have a file that is taking a very long time to update, seemingly longer and onger each month. Here is briefly how the attributes are organized, a elatively simple example: Attribute 1 is multivalued with our G/L Period, i.e. 12-01 vm 12-02 vm 12-03 etc. Attributes 2 through 30 are dependent on attribute 1 and contain a variety of ollar amounts that are accumulated for the respective period in attribute 1. At the end of each month, a new G/L Period is inserted into the multivalued osition of attribute 1 as well as each of the respective multivalued positions n attributes 2 through 30. Nothing complicated. My question is this and is aimed largely at the technicians at Rocket ... If, at the beginning of the year, I were to insert each of the 12-periods into heir respective multivalues in attribute 1 and insert respective <null> ultivalues into attributes 2 through 30, thus performing all of the 'inserts' t once, will the processing each month run faster as numbers are simply ccumulated into attributes 2 through 30 and no inserting of new multivalues will have to be performed? A couple nuggets of information: This is only an example. In the actual file, these records contain many other ttributes and the records overall are relatively large, averaging lengths of bout 3,000 according to FILE.STAT These are not my files so reorganizing them is not an option. The heart of this question is, as a (numeric) number is accumulated in an ttribute, multivalue or subvalue, what causes the record to 'stretch' in ength, thus presumably impacting performance? I would like to think that numeric information is stored in a more 'compact' ethod than strings, thus using less space within the database ... but what I like' and what 'is' are often quite different. Thanks! Sincerely, David Laansma IT Manager Hubbard Supply Co. Direct: 810-342-7143 Office: 810-234-8681 Fax: 810-234-6142 www.hubbardsupply.com <http://www.hubbardsupply.com> "Delivering Products, Services and Innovative Solutions" _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ 2-Users mailing list 2-us...@listserver.u2ug.org ttp://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users