ahk2chan

DB2 Specific Technical Information…

DB2 NUM_POOLAGENTS – DBM CFG Parameter

The DB2 DBM cfg (Database Management Configuration) Parameter NUM_POOLAGENTS represents the number of agents should be stayed in the pool instead of being discarded after used.

If you run an application where you only need a few concurrent connections, then you may want to set the value to a small number to reduce the cost of maintaining a pool of always-idle connections. If you run a transactional application which requires a lot of concurrent connections, then you should set this value to a big number to reduce the cost of creation / termination of the agents.

You can use this command to retreive the current value:
db2 get dbm cfg

Filed under: DB2
  — 2:03 pm on Thursday, August 9, 2007

del.icio.usdigg-ittechnoratigoogle bookmark

Determine When DB2 Table Statistics Were Generated By DB2 runstat

syscat.tables view let you look at DB2 table specific information. One piece of the information is when is the last time DB2 statistics were generated for a particular table, and the field is STATS_TIME. This field will be updated once DB2 runstat command is executed.

The query to retrieve this information for a particular table TABLE_NAME is:

select stats_time from syscat.tables where tabname='TABLE_NAME'

Note that TABLE_NAME is all UPPER-CASE.

(more about Determine When DB2 Table Statistics Were Generated By DB2 runstat…)

Filed under: DB2
  — 6:10 pm on Friday, July 27, 2007

del.icio.usdigg-ittechnoratigoogle bookmark

Create DB2 Explain Tables

In order to use the DB2 explain tool, which shows you the access plan of a query, you need to setup the tables used by the tool. Here is what you should do in a command line window:

  • Connect to the database
  • db2 -tf EXPLAIN.DDL

The EXPLAIN.DDL is located in SQLLIB\misc. You can find this information in DB2 Info Center.

(The tables will be automatically generated if you use the Control Center tool on Windows machine)

Filed under: DB2
  — 4:13 pm on Wednesday, July 11, 2007

del.icio.usdigg-ittechnoratigoogle bookmark