Canada's Leader in Professional Development

855-581-7246 Call us: 416-368-7246 ext 2

DB2 LUW Performance Tuning and Monitoring for Single and Multiple Partition DBs

Currently no upcoming Class Dates


Learn how to tune for optimum performance the IBM DB2 9 for Linux, UNIX, and Windows relational database management system and associated applications written for this environment. Learn about DB2 9 for Linux, UNIX, and Windows in support of single partition and multiple partition (DPF) database environments. Explore performance issues affecting the design of the database and applications using the database, the major database performance parameters, and the different tools that assist in performance monitoring and tuning.

Use tools that are common across the Linux, UNIX, and Windows environments. During labs running on DB2 9.7, develop your ability to use monitoring tools, Explain tools and DB2 utilities like RUNSTATS, REORG and db2batch to tune a database running on your local LINUX workstation.

Course Materials

The course materials cover DB2 9.7 for Linux, UNIX, and Windows.

Hands-On Labs

The twelve labs use the DB2 9.7 Linux, UNIX, and Windows tools and commands to monitor, configure and analyze performance. The labs are performed using one DB2 9.7 for Linux system per student.


  • Define the impact of database design (tables, indexes, and data placement) on database performance
  • Describe database application programming considerations and how they affect performance
  • Identify and describe the parameters (database and non-database) that affect performance
  • Tune parameters to achieve optimum performance for Online Transaction processing (OLTP) or Data Warehouse environments
  • Identify and use the tools that assist in monitoring and tuning of single partition and multiple partition (DPF) databases
  • Analyze Explain reports to identify the access strategies selected by the DB2 Optimizer for execution of SQL statements including the selection of indexes, join techniques, sorts and table queues.


This is an advanced course for database designers, database administrators, and application developers working with DB2 9 for Linux, UNIX, and Windows who are concerned about performance in both single and multiple partition databases.


You should complete:

  • DB2 9 for LUW Multiple Partition DBA Workshop (CL240) or
  • DB2 9 for LUW Multiple Partition Environment for Single Partition DBAs (CL250)
  • or have equivalent experience


5 days


Database monitoring

  • describe the basic principles in monitoring a DB2 database
  • list the tools for monitoring database and application activity
  • use GET SNAPSHOT commands to produce reports for analysis of database performance
  • utilize the administrative routines and views provided by to DB2 to simplify application access to database performance statistics
  • use the db2pd to perform performance analysis or problem determination for a DB2 database
  • utilize the enhanced relational monitoring interfaces with SQL in reporting and monitoring of the database system, data objects, and the package cache to help you quickly identify issues that might be causing problems
  • configure the DB2 Database configuration options that control the collection of request, activity and object level metrics on the entire database
  • compare the enhanced monitoring features with the snapshot monitoring facilities provided by previous DB2 releases

Database Input/Output (I/O) management

  • describe processing for Reading Database Pages into Buffer Pools
  • describe processing for Writing Database Pages from Buffer Pools
  • monitor Database Read and Write Activity using GET SNAPSHOT commands or Administrative Routines and Views
  • monitor Database Logging Activity and select appropriate values for SOFTMAX and MINCOMMIT
  • implement and monitor use of a block based buffer pool to improve table scan performance
  • describe the alternate page cleaning processing associated with the DB2 Registry variable DB2_USE_ALTERNATE_PAGE_CLEANING
  • describe how scan sharing can reduce the I/O workload for accessing large tables

Tablespace and Table design for performance

  • select appropriate values for table space page size and extent size to support application performance requirements
  • describe the calculation of prefetch size when PREFETCHSIZE is set to AUTOMATIC
  • list the advantages of selecting DMS or SMS table space management as well as using Automatic Storage managed table spaces
  • set file system caching options for table spaces to optimize table space performance
  • describe the various row insertion algorithms for tables that are based on using the APPEND option or defining a clustering index
  • plan and implement Row Compression to reduce disk and memory requirements and improve application performance
  • describe how DB2's Index compression option can reduce disk storage requirements for indexes
  • explain how DB2 can compress temporary data to improve application performance
  • utilize the DB2 provided tools and functions to estimate compression results for Indexes and XML data

Database memory management

  • describe memory heap usage for instance memory, database shared memory, and agent private memory
  • explain the management of database shared memory based on setting the configuration option DATABASE_MEMORY to AUTOMATIC, COMPUTED or a specific number of pages
  • select the mode for managing data sort memory using SHEAPTHRES, SORTHEAP, and SHEAPTHRES_SHR
  • monitor DB2 memory usage using the db2mtrk command or the graphical application Memory Visualizer.
  • utilize the db2pd for monitoring current database memory usage
  • use AUTOCONFIGURE to set database configuration defaults when a new database is created or after a database workload changes

Automatic memory management

  • describe how Self-Tuning Memory Manager (STMM) can be used to automatically manage database shared memory heaps
  • explain the differences in STMM processing based on the setting of DATABASE_MEMORY
  • plan and configure a database for self-tuning memory
  • activate or deactivate STMM for selected memory heaps
  • describe the management of sortheap memory based on the configuration of sheapthres and sheapthres_shr
  • explain how DB2 can automatically increase or decrease database memory for multiple DB2 databases running on the same server

Using explain tools

  • describe the advantages of using Visual Explain
  • describe the advantages of using db2exfmt
  • create special tables used by Visual Explain and db2exfmt
  • identify how to set the Explain snapshot and Explain mode registers to capture the information of interest
  • differentiate between the different methods of viewing Explain information

The optimizer

  • describe the stages of the SQL compiler
  • choose the appropriate optimization class
  • describe the catalog statistics and database configuration options impact on access plan selection
  • implement a statistical view to provide better cardinality estimates for complex queries
  • enable the statement concentrator using the stmt_conc database manager configuration parameter to reduce SQL compilation overhead for dynamic SQL statements
  • utilize the db2look utility to extract catalog statistics from existing tables to mimic an existing database environment
  • create an optimizer profile to influence the access plan selected by the DB2 optimizer

Using indexes for performance

  • describe the Indexing options that can be used to improve performance including: Index Only Access, Clustered Index, Reverse Scans, Include Columns, and Index Freespace
  • use the MON_GET_INDEX table function to monitor index usage
  • describe the Block Indexing capability for MDC tables
  • explain how multiple indexes can be combined using Index ORing and Dynamic Bitmap Index ANDing
  • use the Design Advisor to predict performance gains from adding new indexes

Complex SQL performance

  • review Explain reports for costly sort operations
  • describe the differences between Nested Loop, Merge Scan and Hash Joins
  • plan the implementation of Refresh Immediate or Refresh Deferred Materialized Query Tables to improve query performance
  • utilize the design advisor to analyze SQL statements and recommend new MQTs
  • describe the features of Range Partitioned Tables to support large DB2 tables using multiple tablespaces, including the roll-in and roll-out of data ranges
  • Explain the difference between partitioned and non-partitioned indexes for a range-partitioned table
  • Implement partitioned indexes to improve performance when you roll data out or roll data into a range-partitioned table
  • use the DB2 Explain tools to determine if partition elimination is being used to improve access performance to large range partitioned tables

Tools and utilities for performance

  • use the RUNSTATS utility to collect table and index statistics to enable the DB2 Optimizer to generate efficient access strategies
  • select appropriate RUNSTATS options to collect Distribution Statistics or Column Group Statistics to improve cardinality estimates during SQL compilation
  • use the table and indexes statistics to plan for table and index reorganization using the REORG utility
  • set the policies and options for automation of catalog statistics collection.
  • monitor the activity associated with implementing real time statistics collection
  • use the db2batch utility to run SQL workloads and collect performance statistics that can be used to benchmark database and application changes

Application Performance Considerations

  • List examples of application coding techniques that can effect performance
  • Describe the performance advantages of using stored procedures
  • Design applications to maximize record blocking, minimize sort operations and minimize lock contention
  • Evaluate setting the CUR_COMMIT database configuration option to reduce lock waits, lock timeouts or deadlocks
  • Explain how DB2 can access the committed version of a data row that is currently being updated by another application
  • Monitor application performance and lock waits using GET SNAPSHOT commands and SQL queries
  • Set the DB2 registry variables DB2_EVALUNCOMMITTED, DB2_SKIPINSERTED and DB2_SKIPDELETED to reduce lock contention based on application requirements

(Continued in the Remarks Section)

Click here to reach us by Email Contact Us
About | Terms of Use | Privacy Visit our Facebook page   Visit ot Linkedin page   View our Tweets