|
We have a file with 17,960,960 records. We were doing some time trials on BLOCK(*YES). And came up with the following. I have some questions at the end. Test 1: I,F,blocked, no key. Takes 1 minute 31 seconds FITHL01 IF E DISK BLOCK(*YES) C DOW NOT %EOF(ITHL01) C READ(E) ITHL01 C EndDo C EXSR LRSUB Test 2: I,F,unblocked, no key. Takes 1 minute 42 seconds FITHL01 IF E DISK C DOW NOT %EOF(ITHL01) C READ(E) ITHL01 C EndDo C EXSR LRSUB Test 3: I,F,unblocked, key. Takes 44 minutes 53 seconds FITHL01 IF E K DISK C *loval setll ithl01 C DOW NOT %EOF(ITHL01) C READ(E) ITHL01 C EndDo C EXSR LRSUB Test 4: I,F,blocked, key. Takes 8 minutes, 37 seconds. Test 5: I,P, no key. Takes 1 minute 0 seconds. Test 6: I,P, key. Takes 6 minutes 42 seconds. Times came from some processing in *INZSR and LRSUB storing times into a data area. Summary. Processing by key adds a significant amount to the time. Blocking, or using a primary file, takes a lot of this sting out. Explains that message at the bottom of a compile with a I,P file: M e s s a g e S u m m a r y * QRG7086 Severity: 00 Number: 1 Message . . . . : RPG handles blocking function for file. Here are my questions: When should you use BLOCK(*YES)? Is there an overhead to blocking? For example if I am only reading a couple of records, does it take overhead to load a huge chunk of data for a couple of records? Should you use it when doing random chains all over the file? Should you use it when doing a SETLL/READ but only reading a few records? If not, then when is the cut over from when to use it and not to use it? Rob Berendt ================== "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.