Migrating SQL PA statistics using Db2 Admin Tool

Using the statistics migration function by Db2 Admin tool, you can collect and apply the catalog statistics to the system catalog.

Collecting and applying catalog statistics

Note: It is recommended that you backup the statistics before applying any changes to the catalog. After completing the analysis, you can restore the statistics to its original form using the backup.
  1. Select option 2, Advanced Db2 SQL PA Processing, from the primary menu panel. The Advanced Processing Options panel is displayed.
    SQLPA520 ------------ Advanced Processing Options ------------- 10:36
    Option ===> 
                                                                 Db2 system: DC1Q 
                                                               Db2 SQLID : TS6224 
    Options using SQLPA functionality: 
     1 Modify statistics 
     2 Migrate statistics 
     3 Create or drop an index 
    
    Options using Db2 Admin Tool functionality: 
     4 Modify statistics by Db2 Admin Tool 
     5 Migrate statistics by Db2 Admin Tool 
     6 Manage EXPLAIN tables & aliases 
     
    F1=HELP F2=SPLIT F3=END F4=RETURN F5=RFIND F6=RCHANGE 
    F7=UP F8=DOWN F9=SWAP F10=LEFT F11=RIGHT F12=RETRIEVE
  2. Select option 5. The Statistics Migration panel is displayed.
    SQLPA520 ---------------- Statistics Migration ----------------------- 11:41
    Option ===> 
                                                                Db2 system: DC1Q
    Db2 SQLID : TS6224 
    
    Options: 
     1 Collect statistics by ADb2GEN program 
     Build the parameters and execute the program 
     2 Apply statistics by ADBTEP2 program 
     Update the catalog with the collected statistics 
     
    F1=HELP F2=SPLIT F3=END F4=RETURN F5=RFIND F6=RCHANGE 
    F7=UP F8=DOWN F9=SWAP F10=LEFT F11=RIGHT F12=RETRIEVE 
    
    • Select option 1, Collect statistics by ADb2GEN program. This option collects statistics by building the input parameters and executing the ADb2GEN program.
    • Select option 2, Apply statistics by ADBTEP2 program. This option updates the Db2 catalog with collected statistics using the ADBTEP2 program.