Author Topic: Using ARSMAINT to update DB2 Statistics  (Read 5911 times)

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1208
    • View Profile
Using ARSMAINT to update DB2 Statistics
« on: December 23, 2011, 09:02:22 AM »
On my sandbox system needless to say running DB2 statistics is hit or miss at best.

While researching something else today this caught my eye under ARSMAINT parameters:

(-r parm)

Runs database statistics, which causes the database manager to optimize application group index data and make access to information as efficient as possible. To optimize the database, schedule the ARSMAINT program after the following activities:

    After a table is loaded.
    After an index is physically created.
    After a table space is reorganized if inline statistics were not collected.
    After you run extensive updates, deletions, or insertions in a tablespace.
    After you run any of the following utilities without collecting inline statistics:
        RECOVER TABLESPACE
        REBUILD INDEX
        REORG INDEX
    Before you run REORG with the OFFPOSLIMIT, INDREFLIMIT, or LEAFDISTLIMIT options.


That certainly looked interesting, so I ran the following batch job:

//TMP1  EXEC  PGM=IKJEFT01,                                 
//            DYNAMNBR=200                                   
//SYSPROC  DD  DSN=SYS1.SBPXEXEC,DISP=SHR                   
//*                                                         
//SYSTSPRT DD  SYSOUT=*                                     
//*                                                         
//SYSTSIN  DD  *                                             
 oshell logger -d1 starting arsmaint run                     
 oshell /usr/lpp/ars/V8R5M0/bin/arsmaint -I ARCH850 -r       
 oshell logger -d1   ending arsmaint run                     
//*                                                         

As soon as you submit this go to the DA screen in SDSF ... quite a bit of activity in DB2 and ARSSOCKD including starting the "WLM-ESTABLISHED ADDRESS SPACE FOR RUNNING DB2 UTILITIES STORED PROCEDURES."

I'm going to use this as part of my regression bucket when testing.

Ed
#zOS #ODF

jeffs42885

  • Guest
Re: Using ARSMAINT to update DB2 Statistics
« Reply #1 on: February 10, 2012, 08:54:16 AM »
I recently was made aware of this. I have a question. As with certain ARSMAINT commands ran, does this one log a message in the system log?

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1208
    • View Profile
Re: Using ARSMAINT to update DB2 Statistics
« Reply #2 on: February 10, 2012, 12:27:58 PM »
Jeff - I just ran the job in my first post and this is what's in the System Log on my sandbox system:

(oldest entry at bottom, newest at top)

02/10/2012 14:17:49   ARSMAINT         31189   Info   No      164 Application Group Segment Maintenance: Name(System Log) Agid(5001) SegName(SL2) Action(2) Time(0.785)

02/10/2012 14:17:49   ARSMAINT         31189   Info   No       32 Logoff

02/10/2012 14:17:48   ARSMAINT         31189   Info   No      164 Application Group Segment Maintenance: Name(System Load) Agid(5011) SegName(SA2) Action(2) Time(0.682)

02/10/2012 14:17:47   ARSMAINT         31189   Info   No      164 Application Group Segment Maintenance: Name(LARRYX_LINEDATA_CACHE) Agid(5100) SegName(GBA1) Action(2) Time(2.008)

02/10/2012 14:17:45   ARSMAINT         31189   Info   No       30 Login: svlspil2.svl.xxx.com 4.22.127.136 non-SSL (z/OS) (ARSMAINT) (8.5.0.4)

Ed
#zOS #ODF

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1208
    • View Profile
Re: Using ARSMAINT to update DB2 Statistics
« Reply #3 on: June 12, 2012, 07:50:01 AM »
Note:  This is an 8.4.1 feature and above feature
#zOS #ODF