IBM Support

Determining when the last time DB2 statistics were generated

Troubleshooting


Problem

This technote shows how to check when the last time DB2 statistics were generated for an ITDS backend database. This is a very important activity for maintaining the health and performance of an ITDS server.

Resolving The Problem

Here's SQL that you can run to check to see the last time a db2 runstats was performed.

db2 connect to <ldap_db_name>
db2 "select STATS_TIME from syscat.tables where tabname='<TABLENAME>'"
db2 connect reset

(Since the ITDS runstats/idsrunstats runs against all tables in the database, it suffices to check any table. See the example below.

Here's an example:

db2 connect to ldapdb2

Database Connection Information

Database server = DB2/AIX64 8.2.7
SQL authorization ID = LDAPDB2
Local database alias = LDAPDB2

db2 "select stats_time from syscat.tables where tabname = 'OBJECTCLASS'"

STATS_TIME
--------------------------
2007-06-13-11.50.06.657049

1 record(s) selected.

See the ITDS Performance Tuning guide for instructions on correctly updating DB2 statistics for an ITDS backend database:

http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=/com.ibm.IBMDS.doc/tuning.htm

[{"Product":{"code":"SSVJJU","label":"IBM Security Directory Server"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"5.2;6.0;6.1;6.2;6.3;6.3.1;6.4","Edition":"","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Product Synonym

ITDS;Secureway;TDS;IBM Tivoli Directory Server

Document Information

Modified date:
16 June 2018

UID

swg21263995