DB2 Administration

Performance problems.

     Rule nr. 1
       
Find the concerning SQL statement
        and Examine it

     Rule nr. 2 - Reorganize with Runstats
        Reorganize TS as follows
            STATISTICS TABLE(ALL)
            INDEX(ALL KEYCARD FREQVAL NUMCOLS 1 COUNT 10
            FREQVAL NUMCOLS 2 COUNT 10
            FREQVAL NUMCOLS 3 COUNT 10
            FREQVAL NUMCOLS 4 COUNT 10
            FREQVAL NUMCOLS 5 COUNT 10)

    Rule nr. 3 - Explain SQL statement
       
EXPLAIN ALL FOR ...
        and join the Explain data with SYSIBM.SYSTABLES information
        such as number of pages, number of rows, etc.
            (This table information is as important as the Explain data)

    Rule nr. 4 - Create extra index
        Create extra index based on the SQL Explain

Space allocation

    Rule nr. 1 - PRIQTY=48, SEQQTY=(10% of the required space)
        Allocate PRIQTY and SECQTY as follows
            If space required equals 10000 Kbytes
               then PRIQTY = 48
                and SECQTY = 1000 (equals 10% of the required space) with a minimum of 96

    Rule nr. 2 - FREEPAGE=0 and PCTFREE=0

Nice to know

   Value of PI
        SELECT RADIANS(180) FROM SYSIBM.SYSDUMMY1