Updating and sampling of catalog statistics for DB2 tablespace

DB2DatabaseBig Data Analytics

The DB2 RUNSTAT utility records the details of tablespace, table, index, etc in the system catalog. The RUNSTAT generates the data like space available in table space, indexes, access paths, etc. We can use the below JCL step to update the catalog statistics of DB2 tablespace TABSPAC2 and to sample 25% of the rows.

//STEP1 EXEC DSNUPROC
//UTPRINT DD SYSOUT=*
//SYSIN DD *
RUNSTATS TABLESPACE DBSET1.TABSPAC1
   TABLE(ALL) SAMPLE 25
   INDEX(ALL)

The SYSIN parameter can be used with RUNSTATS TABLESPACE statement followed by tablespace name qualified by database name.

raja
Published on 12-Sep-2020 15:12:49

Advertisements