Download
adabas internals for programmers n.
Skip this Video
Loading SlideShow in 5 Seconds..
ADABAS INTERNALS FOR PROGRAMMERS PowerPoint Presentation
Download Presentation
ADABAS INTERNALS FOR PROGRAMMERS

ADABAS INTERNALS FOR PROGRAMMERS

1 Views Download Presentation
Download Presentation

ADABAS INTERNALS FOR PROGRAMMERS

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. ADABAS INTERNALS FOR PROGRAMMERS Jim Poole

  2. CONTENTS BY THE NUMBERS 3 DIRECT CALL EQUIVALENTS TO NATURAL/SQL 4 DIRECT CALL BASICS 7 DIRECT CALL PATH 13 INTERNALS OVERVIEW 14 DATA STORAGE 15 ASSOCIATOR OVERVIEW 24 ADDRESS CONVERTER 25 INVERTED LISTS 27 WORK OVERVIEW 40 GLOSSARY OF POOLS,QUEUES,TABLES,DB.PARMS 42 OTHER KEY ADARUNS (AND RSP CODES) 43 FB,IFB,(DE)COMPRESSION 45 COMMAND PROCESSING 51 ANALYZE CODE 56 DDLOG 57

  3. THE MAX: BY THE NUMBERS V4,V5,V6,V7 -> V8 RECORDS PER FILE: 16.8M or 4.3G (3-BYTE,4-BYTE(ISN) FILES PER DATABASE: 255 or 65K or 5000 (1B,2B FNR) DECOMPRESSED LRECL: 32K COMPRESSED LRECL: DATASTORAGE BLKSIZE MINUS 4 3390=5064-4 8391=10796-4 (V8 SPANNED BLOCKS) FIELDS PER FILE: 26*36-10=926 4*ASSOBLKSIZE FOR FLDS,DEs,etc MU/PE OCCURRANCES: 191 (V8 65K) SUPERDE PARENT FIELDS: 1 TO 20 FIELD TYPES: (SEE UTILITIES MANUAL: ADACMP)

  4. DIRECT CALL COMMAND NATURAL NATIVE SQL OP (IMPLICIT AT SIGNON) CONNECT CL (IMPLICIT AT SIGNOFF) DBCLOSE L2/L5 CID L3/L6 CID L1/L4 (CID) L9 CID READ LOGICAL GET READ BY ISN (read records from FIND) READ PHYSICAL (default READ) HISTOGRAM READ PHYSICAL READ ISN READ ISN with SEQUENCE HISTOGRAM READ LOGICAL (READ BY DE values) DIRECT CALL EQUIVALENTS TO NATURAL/SQL NOTE 1: L4,L5,L6 ARE READ WITH HOLD NOTE 2: CID IS COMMAND ID REQUIRED (CID) IS OPTIONAL DEPENDING ON FUNCTION

  5. DIRECT CALL COMMAND NATURAL NATIVE SQL S8 (CID) A1/A4 (CID) N1 (CID) S9 (CID) S2 (CID) E1/E4 (CID) N2 (CID) S1/S4 (CID) STORE UPDATE (compare ISN lists) STORE USING NUMBER FIND (sorted by) DELETE FIND . . . SORTED BY DELETE INSERT INSERT WHERE ISN= COMPARE SORT FIND with ORDER BY clause FIND UPDATE DIRECT CALL TO NATURAL/SQL cont. NOTE 2: CID IS COMMAND ID REQUIRED (CID) IS OPTIONAL DEPENDING ON FUNCTION

  6. DIRECT CALL COMMAND NATURAL NATIVE SQL RC (CID) ET RE BT HI RI RELEASE RELEASE (close loop) GET TRANSACTION DATA (put ISN on hold) BACKOUT TRANSACTION END TRANSACTION HOLD ISN READ USERDATA RELEASE CLOSE ROLLBACK WORK COMMIT WORK RELEASE ISN DIRECT CALL TO NATURAL/SQL cont. NOTE 2: CID IS COMMAND ID REQUIRED (CID) IS OPTIONAL DEPENDING ON FUNCTION

  7. SEE ADABAS COMMAND REF MANUAL DIRECT CALL BASICS CALL ADABAS USING CONTROL-BLOCK, FORMAT-BUFFER, RECORD-BUFFER SEARCH-BUFFER, VALUE-BUFFER ISN-BUFFER CONTROL-BLOCK (req) 80 BYTES FORMAT-BUFFER (opt) FIELDS TO READ/UPDATE RECORD-BUFFER (opt) VALUES RETURNED/UPDATED SEARCH-BUFFER (opt) SEARCH CRITERIA VALUE-BUFFER (opt) SEARCH VALUES ISN-BUFFER (opt) ISNs RESULTING FROM SEARCH

  8. OFF SET FIELD LEN 0A 00 14 02 10 04 0C 08 RESERVED COMMAND CODE COMMAND ID ISN QUANTITY FILE NUMBER ISN ISN LOWER LIMIT RESPONSE CODE 2 2 4 4 2 4 2 4 1B DBID, 1B FNR DIRECT CALL BASICS (CONTROL-BLOCK) L1,S1,ET, etc USED FOR: -ISN LIST ID -SEQ CMD PTR -ID IFB Eg HEX: 1100 01 01 NATURAL 1100 STATEMENT NO. 01 PGM LEVEL 01 CARDINAL NO.

  9. OFF SET FIELD LEN 1E 20 24 23 1C 22 1A 18 RECORD BUFFER LENGTH COMMAND OPTION 1 FORMAT BUFFER LENGTH ADDITIONS 1 COMMAND OPTION 2 SEARCH BUFFER LENGTH FORMAT BUFFER LENGTH ISN BUFFER LENGTH 1 2 2 2 2 2 1 8 L3,L6,L9 SEQ DE S2,S9 SORT Des S8 ISN LIST CIDs DIRECT CALL BASICS (CONTROL-BLOCK)

  10. OFF SET FIELD LEN 2C 4C 30 38 48 40 ADDITIONS 5 ADDITIONS 4 ADDITIONS 3 ADDITIONS 2 USER AREA COMMAND TIME 4 8 4 8 4 8 DIRECT CALL BASICS (CONTROL-BLOCK) COMPRESSED LRECL DECOMPRESSED LRECL RSP SUB-CODE PASSWORD CIPHER GLOBAL FORMAT ID if First 2 bits set to 11

  11. DIRECT CALL BASICS (FORMAT BUFFER) BA,020,A,PP,10,U. EG. EG. BA,PP. EG. LJ,018,A,LKC,3,U,LK0001-0002,094,A. ELEMENTS (SEPARATED BY COMMAS): FIELD-NAME /OCC/, LENGTH , FORMAT FIELD-NAME /OCC1-OCC1/ FIELD-NAME “C”

  12. DIRECT CALL BASICS (SEARCH BUFFER) AS,018,A. EG. AS,018,A,D,BB,10,U EG. EG. AS,S,AS,D,BB. EG. (CID1),D,AB,3,U. ELEMENTS (SEPARATED BY COMMAS): FIELD-NAME or CID SAMPLE CONNECTORS: D - AND O - SAME DE R - DIFFERENT DE S - THRU N - NOT used with THRU

  13. PROGRAM ADALINK • DETERMINE DBID • DETERMINE CMD TYPE • CREATE ADABAS USERID • CALL ADABAS SVC/ ROUTER RSP CODES 148 151 152 254 255 • DB ID TABLE ADABAS • BUILD CQE • MOVE UB TO NAB DIRECT CALL PATH NOTE: UB = CB+FB+RB+SB+VB+IB

  14. CMD.Q. CMD.Q. NC=20-200 NC=20-200 THREADS THREADS NT=5-30 NT=5-30 TBQ TBQ WORK POOL CQE SELECT CQE SELECT USR-CID-INFO USR-CID-INFO FORMAT POOL LS= LQ=20-400K LQ=20-400K TBI TBI LFP=.5-5M LWP=1-5M USER.Q USR-CID-INFO USR-CID-INFO NU=200-3000 LI=20-100K LI=20-100K ASSO ASSO DATA DATA WORK FCB UI BLKSIZE=5724 MI BLKSIZE=5064 BLKSIZE=5064 BLKSIZE=2544 BLKSIZE=2544 INTERNALS OVERVIEW USR-CID-INFO BUFFER POOL ATTACHED BUFFERS LBP=30-100M NAB=20-200 FDT HOLD.Q PART 2 NH=4K-60K PART 3 RECs NI PLOGS AC BLKSIZE=5724

  15. . . . . . . DATA STORAGE (DS) FILE A | FILE B| FILE C | unused | FILE D | unused RABN 1 RABN 2 RABN 3 RABN N NOTES: FIXED ALLOCATION FIXED BLOCKSIZE (3390=5064 8391=10796) EACH FILE IS A RANGE OF DATASTORAGE RABNS RABN = BLOCK = RELATIVE ADABAS BLOCK NUMBER

  16. DS RABN HDR RECORD RECORD RECORD FREE SPACE REC LEN Fields… Block length X 0004 PAD (DSST) DSST: PER DS BLOCK: SPACE FROM LAST REC TO PAD

  17. HDR RECORD RECORD RECORD (DSST) PAD HDR RECORD RECORD RECORD PAD HDR RECORD RECORD (DSST) PAD RECORD ? DS RABN: UPDATE RECORD HDR RECORD RECORD RECORD (DSST) PAD DSST: PER DS BLOCK: SPACE FROM LAST REC TO PAD

  18. DS RABN: ADD RECORD HDR RECORD RECORD RECORD (DSST) PAD RECORD ? ? ? DSST: PER DS BLOCK: SPACE FROM LAST REC TO PAD

  19. SET BY DBA (AOS,ADADBS) USED FOR NEW RECORDS AND POPPED RECORDS OFF: GO TO 1ST UNUSED DS RABN ON: SCAN DSST (UP TO X ENTRIES) IF SPACE USE IT IF NO SPACE, GO TO 1ST UNUSED DS RABN NEXT DSST SCAN, NEXT ENTRY DS RABN: REUSE DS ? 1ST UNUSED DSST: PER DS BLOCK: SPACE FROM LAST REC TO PAD

  20. DS RABN: PROBLEM/TIPS READ EMPLOYEES PHYSICAL COST-ADJUSTMENT = 2 * COST ADJUSTMENT UPDATE SAME LOOP ? ? ? ? ? ? ? ? READ EMPLOYEES PHYSICAL IF YEAR > 99 THEN end-program-logic IF YEAR < 60 THEN YEAR = YEAR + 2000 ELSE YEAR = YEAR + 1900 UPDATE SAME LOOP ? ? ? ? ? ? ? ?

  21. DS RECORD 2B 4B IRL ISN FIELD 1 FIELD 2 FIELD 3 FIELD N IRL = Inclusive Record Length ISN = Internal Sequence Number RECORD COMPRESSED AT THE FIELD LEVEL FIELD: L/VALUE - COMPRESSED, NULL SUPPRESSED FIELDS (NU) VALUE - FIXED LENGTH FIELDS (FI) EFC - 1 BYTE EMPTY FIELD COUNTER, X FIELDS EMPTY MU/PE C - MU/PE OCCURRENCE COUNTER

  22. FIELD COMPRESSION/ TIPS NU – NULL SUPPRESS CAUTION ON DE, AND SOURCE FOR DE – DEFAULT COMPRESSION FI – FIXED COMPRESSION IF NEVER EVER GOING TO CHANGE LENGTH Eg. YY TO CHANGE COMPRESSION OPTION: 1. ADACMP DECOMPRESS FILE 2. ADACMP COMPRESS FILE 3. ADALOD FILE

  23. 2. EMPTY FIELDS AT END OF RECORD ARE TREATED AS NU CHANGING FIELD LENGTHS IS EASY (NU,dflt) ADDING NEW FIELDS IS EASY INSERTING NEW FIELDS IS NOT DS RECORD AGAIN/TIPS 2B 4B IRL ISN FIELD 1 FIELD 2 LAST EMPTY FIELD 1. DECOMPRESS UNTIL LAST FIELD REQUESTED. PUT FREQUENTLY USED FIELDS UP FRONT FOR NEW PE’S 02,XA,1,A,NU 02,XN,1,P,NU

  24. . . . . . . RABN 1 RABN 2 RABN 3 RABN N ASSOCIATOR OVERVIEW FCBs | FDTs | DSST | FILE-X AC | FILE-X UI/MI | FILE-X NI |unused NOTES: FIXED BLOCKSIZE - (3390=2544 8391=4136) FCB – FILE CONTROL BLOCK FILE OPTIONS (eg. REUSE-DS, REUSE-ISN) POINTER TO ALL FILE EXTENTS FDT - FIELD DEFINITION TABLE. FIELDS, FORMAT,LENGTHS,OPTIONS,TYPE,etc

  25. 0 DS RABN 1 DS RABN 1 DS RABN 1 DS RABN 1 DS RABN 2 0 DS RABN 2 DS RABN 5 DS RABN 2 DS RABN 2 DS RABN 2 DS RABN 8 DS RABN 2 DS RABN 2 ISN ENTRY ADDRESS CONVERTER (AC) 0 1 2 • ONE PER FILE, RANGE OF ASSO RABNS • ONE ENTRY PER POSSIBLE ISN • 3 BYTES • ASSO BLOCK (2544) = 848 ENTRIES • EACH ENTRY CONTAINS DS RABN OR 0 • COMPACT: • 20M RECORD FILE IN 24K ASSO BLOCKS • E. FAST ACCESS: OFFSET ADDRESSING 3 4 5 6 7 8 9 10 11 12 13 14

  26. SET BY DBA (AOS,ADADBS) USED FOR NEW RECORDS OFF: GO TO TOPISN + 1: ON: SCAN FCB AND AC (UP TO 1 AC BLOCK) IF ISN AVAILABLE, USE IT IF NO ISN, GO TO TOPISN + 1 NEXT AC SCAN, NEXT AC BLOCK AC: REUSE ISN/TIPS TOPISN = 222,222 STORE EMPLOYEES WRITE *ISN ISN = ? ? ? ? ? ? ? ?

  27. THE CONCEPTUAL VIEW INVERTED LISTS VALUE CNT ISN LIST UQ-DE MU-DE SUB-DE PE-DE SUPER-DE NU-DE HYPER-DE PHONETIC-DE L ADAM 3 2 , 5 , 10 L ANSEL 1 3 L AXEL 200 1,4,6,20,. . .,1020 L BAIN 3 11, 12,70 L BEERE 39 7,9,13,…,2010 L BINN 3 8,15,3010 SORTED BY VALUE BY ISN 1 INVERTED LIST PER DESCRIPTOR

  28. FCB A MORE ACCURATE VIEW INVERTED LISTS <= ( 1 BLOCK AT HIGHEST) UI => MI => NI => • MULTI-LEVEL INDEX ( 3 – 15 ) • BUILT OF ASSO NI AND UI/MI RABN RANGES • EACH RABN CONTAINS: a. 2 BYTE FIELD DEFINING USED BYTES b. 2 BYTE LEVEL INDICATOR c. X ELEMENTS d. PAD

  29. PAD DE LEN BLK LEN DE-VALUE 01 NI-ELEMENT ISN COUNT NI-ELEMENT ISNa ISNb NI-ELEMENT ISNc ISNx NI: NORMAL INDEX BLOCKS 1Byte X Bytes 1-2 Bytes 3-4 Bytes Each • EACH NI BLOCK IS UNIQUE TO ONE DESCRIPTOR. • WITHIN EACH NI, SORTED BY VALUE BY ISN • TWO SUCCESSIVE NI BLOCKS MAY NOT BE IN SEQUENCE. • DE-VALUEs ARE COMPRESSED • IF COUNT (ISQ) > 127, THEN 2b COUNT USED

  30. EXAMPLE 1 EXAMPLE 2 MEAN COMPRESSED DE-LENGTH=10 / 3b ISN / UQ.DE (ISQ=1) DEVICE BLKSIZE FORMULA MAX ELEMENTS PER BLOCK 3390 2544 (2544-4) / ( 1 + 10 + 1 + 3 * 1 ) 169 8391 4136 (4136-4) / ( 1 + 10 + 1 + 3 * 1 ) 275 • MEAN COMPR DE-LEN=40 / 3b ISN / MAX ISNs PER BLOCK ?? • DEVICE BLKSIZE FORMULA MAX ISNs PER BLOCK • 3390 2544 ((2544-4) - ( 1 + 40 + 2 )) / 3 832 • 8391 4136 ((4136-4) - ( 1 + 40 + 2 )) / 3 1363 • USING 4b ISNs 624 • 8391 USING 4b ISNs 1022 ?? HOW MUCH PER BLOCK ?? NI ELEMENT = 1 + VAL.LEN + (1or2) + (3or4)xN NI: NORMAL INDEX BLOCKS

  31. PAD BLK LEN 02 MI-ELEMENT MI-ELEMENT MI-ELEMENT MI: MAIN INDEX BLOCKS DE LEN DE-VALUE ISN PTR TO NI RABN 1Byte X Bytes 3 or 4 Bytes 3 Bytes • EACH MI BLOCK IS UNIQUE TO ONE DESCRIPTOR. • WITHIN EACH MI, SORTED BY VALUE BY ISN • TWO SUCCESSIVE MI BLOCKS MAY NOT BE IN SEQUENCE. • DE-VALUEs ARE COMPRESSED • NI RABN PTR IS NI BLOCK WHOSE FIRST ELEMENT CONTAINS • THIS DE-VALUE/ISN

  32. MI ANSEL 1 3 BAIN ADAM 0 0 ADAM 3 2,5,10 AXEL 200 1,4,6,20,111,222,. . .,1020 PAD BAIN 3 11,12,70 PAD BEERE 39 7,9,13,…,2010 BINN 3 8,15,3010 MI: MAIN INDEX BLOCKS NI NI NI

  33. EXAMPLE MEAN COMPRESSED DE-LENGTH=10 / 3b ISN DEVICE BLKSIZE FORMULA MAX NI BLOCKS 3390 2544 (2544-4) / ( 1 + 10 + 3 + 3 ) 149 8391 4136 (4136-4) / ( 1 + 10 + 3 + 3 ) 243 ?? HOW MUCH PER BLOCK ?? MI ELEMENT = 1 + VAL.LEN + (3or4) + 3 MI: NORMAL INDEX BLOCKS

  34. PAD BLK LEN 03- 15 UI-ELEMENT UI-ELEMENT UI-ELEMENT UI: UPPER INDEX BLOCKS DE NAME FLAG DE-LEN DE-VALUE ISN PTR TO RABN 2b 1b 1b X Bytes 3or4 Bytes 3 bytes • EACH U BLOCK CAN HAVE MULTIPLE DESCRIPTORS. • WITHIN EACH UI, SORTED BY DE BY VALUE BY ISN • TWO SUCCESSIVE UI BLOCKS MAY NOT BE IN SEQUENCE. • DE-VALUEs ARE COMPRESSED • RABN PTR IS TO LOWER BLOCK WHOSE FIRST ELEMENT CONTAINS THIS DE-VALUE/ISN • MULTIPLE LEVELS OF UI BLOCKS ARE POSSIBLE

  35. ADAM 0 ???? ???? NI DE VALUES SPANNING BLOCKS MI ADAM 12345 BAKER 128 NI ADAM 700 1,4,6,20,111,222,. . . ,12000 PAD NI ADAM 2 12345,50000 ANSEL 1 12 PAD HISTOGRAM MAY READ MULTIPLE NI BLOCKS

  36. ISN ISN MAX ISNQ FOR ADAM IS ?? IF MI: ADAM 0 BAIN 0 ISN ISN MAX ISNQ FOR ANSEL IS ?? IF MI: ADAM 0 BAIN 0 ISN ISN ISN ISN ISN ISN ADAM ADAM 0 0 ADAM BAIN 12345 12345 BURK BAIN 0 0 IF MI: IF MI: MAX ISNQ FOR ADAM IS ?? MAX ISNQ FOR BAIN IS ?? MAX 832 ISNs/BLK (3390,3b ISN) MI/NI ESTIMATION DE VALUES SPANNING BLOCKS

  37. UI MD MI MD MX NY NI MD MX MD MX 50/50 BLOCK SPLIT UPDATE NEXT HIGHEST MD MX UPDATING INVERTED LISTS UI MD MI MD NY NI MD MX

  38. INVOICES EXAMPLE DE=INVOICE NO. UPDATING INVERTED LISTS • SORTED ASCENDING B. SORTED DESCENDING BY INVOICE NO. BY INVOICE NO. READ WORK FILE STORE CUSTOMER-FILE READ WORK FILE STORE CUSTOMER-FILE

  39. ADABAS 7 OPTION AT FILE LEVEL DONE AT FILE LOAD OR REORDER FIC ONLY WITHIN BLOCK 40-60% ASSO SAVINGS FASTER READS OF INVERTED LISTS / ASSOCIATOR FIC (FORWARD INDEX COMPRESSION NO FIC FIC 70 BARKER 4 3 NES 2 5 Y 2 3 R 4 4 ETT 2 4 Y 6 BARKER 6 BARNES 6 BARNEY 4 BARR 7 BARRETT 4 BARRY 33 BYTES 21 BYTES

  40. I ADARUN LP= USED FOR: BACKOUTS, AUTORESTART CONTAINS: BEFORE/AFTER IMAGES OF RECORDS DVTs (DESCRIPTOR VALUE TABLE) ET,BT,BUFFER FLUSHES, etc. TOO SMALL: RSP CD 9 – 15 , 8 WORK OVERVIEW II ADARUN LWKP2= (or FORMULA) USED FOR: COMPLEX FINDS CONTAINS: INTERMEDIATE ISN AND BIT STRINGS TOO SMALL: DELAYED FINDS, RSP.CD 74 III WORKSIZE – LP – LWKP2 USED FOR: RESULTANT ISN LISTS CONTAINS: RESULTANT ISN LISTS TOO SMALL: RSP.CD 73 300-1200 CYLS

  41. CMD.Q. NC=20-200 THREADS NT=5-30 TBQ WORK POOL CQE SELECT USR-CID-INFO FORMAT POOL SECURITY POOL LS= LQ=20-400K USR-CID-INFO LCP= TBI LFP=.5-5M LWP=1-5M USER.Q USR-CID-INFO BUFFER POOL ATTACHED BUFFERS NU=200-3000 LBP=30-100M LI=20-100K NAB=20-200 ASSO ASSO DATA DATA WORK FCB HOLD.Q NH=4K-60K UI BLKSIZE=5724 MI UQ DE POOL LDEUQP= BLKSIZE=5064 BLKSIZE=5064 BLKSIZE=2544 BLKSIZE=2544 INTERNALS OVERVIEW AGAIN FDT PART 2 PART 3 RECs NI PLOGS AC BLKSIZE=5724

  42. NC (CQ)COMMAND QUEUE- DB CALLS IN TRANSIT (WAIT,IN,RETURN 151 NAB ATTACHED BUFFERS – USER BUFFERS PER CQ ELEMENT 255 NT THREADS – WHERE CMD IS ACTUALLY EXECUTED NU (UQ) USER QUEUE – ONE ELEMENT PER USER 72 LQ (TBQ) TABLE OF SEQUENTIAL COMMANDS – FOR L3/6,L2/5,L9 BY USER-CID, POINTER FOR USER SEQUENTAIL PROCESS 70 LI (TBI) TABLE OF RESULTANT ISN LISTS – FOR Sx,L1/4 BY USER-CID 71 LWP WORK POOL – PER THREAD, WORK AREA FOR COMMANDS 88 LFP (FP)FORMAT POOL – INTERNAL FORMAT BUFFERS,BY USER-CID 42 LBP IO BUFFER POOL – MOST FREQUENT ASSO/DATA BLOCKS LDEUQP UNIQUE DESCRIPTOR POOL – IN FLIGHT UPDATED UQ DEs 197 GLOSSARY OF P,T,Q ADARUN NAME-DEFINITION RC NH (HQ) HOLD QUEUE – FILE/ISNS ON HOLD 9-1 LCP SECURITY POOL 204

  43. LU NQCID NONDES LS NISNHQ NSISN MAX FNR/ISNs ON HOLD PER PER USER MAX ISNs PER ENTRY IN TBI (ISN LIST) TABLE MAX CIDs PER USER MAX SPACE FOR WORK POOL (LWP) ON A COMMAND ARE NON DESCRIPTOR SEARCHES ALLOWED? MAX SPACE FOR USER BUFFERS ON A COMMAND (64K) 47 152 1 46 68 OTHER KEY ADARUNS SPACE/COUNT LIMITS ADARUN NAME-DEFINITION RC SWITCHES

  44. TLSCMD CT TNAE TNAX TNAA TIME LIMIT EXCEEDED FOR SEARCH/FIND COMMAND COMMAND NOT RETURNED TO USER WITHIN TIME NON-ACTIVITY TIME LIMIT FOR ACCESS ONLY USERS NON-ACTIVITY TIME LIMIT FOR ET USERS NON-ACTIVITY TIME LIMIT FOR EXU USERS 7 9-3 254 9-3 9-3 OTHER KEY ADARUNS (cont) TIMERS ADARUN NAME-DEFINITION RC TT TRANSACTION TIME LIMIT 9-2

  45. IFB IFB HD HD BB BB CC CC AA AA FORMAT BUFFER, INTERNAL FORMAT BUFFER FB,IFB,(DE)COMPRESSION I. USER FB CPU BB,CC,AA. TRANSLATE ( IFB Len = 60 + 24*F ) II. USER RB CPU BB-VALUE,CC-VAL.,AA-VAL. DE.COMPRESS AA-BB-CC-DD---- DS COMPRESSED RECORD

  46. FB,IFB,(DE)COMPRESSION FORMAT TRANSLATION CAN BE CPU INTENSIVE COMPRESSION/DECOMPRESSION CAN BE CPU INTENSIVE 1. FIELD SEQUENCE DOES NOT MATTER • IN FILE DESIGN: • FREQUENTLY USED FIELDS SHOULD BE UP FRONT • (DECOMPRESS/COMPRESS UP TO LAST FIELD IN IFB) 3. LIMIT VIEWS TO JUST DESIRED FIELDS

  47. CASE 1 SPECIFIC CASE 2 GENERIC 20 FIELD VIEW 214 FIELD VIEW 3. LIMIT VIEWS TO JUST DESIRED FIELDS FB,IFB,(DE)COMPRESSION EXAMPLE INCREASE BUFFER LENGTH 115 BYTES 1718 BYTES ELAPSED TIME 9.4 MIN. 14.7 MIN. 56% USER CPU ----- ----- 90% DATABASE CPU ----- ----- 70%

  48. IF GFID, GLOBAL IFB STORED IN LFP FOR RE-USE ONE IFB / VIEW CPU . . . GLOBAL FORMAT ID, Le FORMAT POOL FB,IFB,GFID,LFP TRANSL. SCAN OVERWRITES USER FB CPU IFB FORMAT POOL IF CID /= 0/b (AND NO GFID) IFB STORED IN LFP FOR RE-USE ONE IFB / VIEW / USER

  49. UQ FB,IFB,GFID,LFP IFB IFB IFB IFB IFB GFIDs IFB IFB IFB IFB IFB FORMAT POOL UQE: USER IFBs CHAINED / MOST FREQUENT IFBs IN UQE GFIDs CHAINED USE CID TO SAVE ON FORMAT TRANSLATIONS RELEASE CIDs (RC) WHEN DONE USE GFIDs FOR COMMON VIEWS DO NOT USE GFIDs FOR VIEWS RARELY USED

  50. NATURAL GFID RUN SOURCE => NO GFID EX OBJECT => GFID DEFAULT: OPTION: 0010 OPTIONS GFID=OFF USE ON LOW-SHARE PROGRAMS