Presentation is loading. Please wait.

Presentation is loading. Please wait.

DARE TO BE DIFFERENT (AGAINST ALL DOGMAS) Armando J. Arranja Series Finale.

Similar presentations


Presentation on theme: "DARE TO BE DIFFERENT (AGAINST ALL DOGMAS) Armando J. Arranja Series Finale."— Presentation transcript:

1 DARE TO BE DIFFERENT (AGAINST ALL DOGMAS) Armando J. Arranja Series Finale

2 DB2 UP AND RUNNING

3 DON’T SPEND MONEY

4 HELP DEVELOPERS

5 TUNE SQL

6

7 UNLOAD LOAD REORG

8 SELECT DISTINCT A.COL1, B.COL2, C.COL3 FROM T003 A INNER JOIN ORG_D B ON A.COD = B.ORG LEFT OUTER JOIN T010_CLI C ON A.N = C.N AND C.COD_TIP_AL ='R' 30 minutes UNLOAD

9 DFSORT //SYSIN DD * JOINKEYS F1=INFILE1,FIELDS=(1,9,A) JOINKEYS F2=INFILE2,FIELDS=(1,9,A) REFORMAT FIELDS=(F1:1,21) SORT FIELDS=(1,12,A),FORMAT=CH SUM FIELDS=(13,9),FORMAT=PD /* //SYSIN DD * JOINKEYS F1=IN1,FIELDS=(1,12,A) JOINKEYS F2=IN2,FIELDS=(1,12,A) JOIN UNPAIRED,F1 REFORMAT FIELDS=(F1:1,21,F2:13,9,F2:23,9) OPTION COPY /* INNER JOIN LEFT OUTER JOIN

10 UNLOAD B UNLOAD C SORT (INNER JOIN) SORT (LEFT OUTER JOIN) UNLOAD A

11 UNLOAD C UNLOAD A 30 minutes 5 minutes UNLOAD B UNLOAD C SORT (INNER JOIN) SORT (LEFT OUTER JOIN) UNLOAD A

12 OPEN FETCH SELECT CLOSE 2 hours

13 OPEN FETCH SELECT CLOSE SELECT 200 M1 M 0.034 seconds200 000X + 2 HOURS !!!

14 SORT JOIN UNLOAD LOAD 30 MINUTES

15 OPEN FETCH SELECT CLOSE SELECT 800 000 0.0003 seconds200 000X 2 MINUTES !!!

16 THE END DARE TO BE DIFFERENT (AGAINST ALL DOGMAS)

17 March 2013 armando.jorge.arranja@bancobpi.pt


Download ppt "DARE TO BE DIFFERENT (AGAINST ALL DOGMAS) Armando J. Arranja Series Finale."

Similar presentations


Ads by Google