1.08k likes | 1.23k Views
®. Tuning with Optimization Service Center Part I. Patrick Bossman IBM Silicon Valley Lab. Columbia, MD. September 12, 2007. Agenda. Overview of Optimization Service Center Connect and configure OSC Workload (application) Tuning Query tuning (Part II). Overview.
E N D
® Tuning with Optimization Service Center Part I Patrick Bossman IBM Silicon Valley Lab Columbia, MD September 12, 2007
Agenda • Overview of Optimization Service Center • Connect and configure OSC • Workload (application) Tuning • Query tuning (Part II)
Overview • Optimization Service Center (OSC) • New no charge product supported for connections to DB2 9. • Support for DB2 for z/OS V8 connections in open beta • Workstation tool for monitoring and tuning of queries • Facilitates the identification and tuning of workloads (sets of queries) as well as individual queries • New powerful query diagnostic tools enable faster deep analysis of queries
Overview • OSC feature list • Support for workload tuning • Stand-alone workload creation • Push-out model (monitoring) • Visual Explain query graphing capabilities • Query formatting and annotation • Query report • Visual Plan Hint • Statistics Advisor - query and workload
Connect and configure • Launch OSC • Initial screen is connection and configuration • Review look and feel • Review layout of screen
Project navigator • Navigate through open projects
Connection close-up • Connection • Subsystems cataloged in DB2 Connect listed • Use subsystem menu option to add / remove subsystems
Add Subsystem • Add DB2 subsystem connection • Select subsystem button • Choose Add
Connection information • Add DB2 subsystem connection • Subsystem alias is a meaningful name to you • Location, hostname, port • Can be found in <ssid>MSTR address space DDF startup message DSNL004I
DSNL004I • DSNL004I message • Location = location • Domain = hostname • TCPPORT = port
Jeez Pat, Connect already! • Connect to subsystem • Choose Connection, connect • You can connect to more than one subsystem and perform activities on more than one subsystem at a time.
Create alias to explain tables • Create aliases • You can use OSC to create ALIASes to the explain tables also.
Application tuning • Application tuning • Creating workloads • Workload options • Workload tuning features
Application tuning process • What is application tuning? • Identify what the application workload is • Individual SQL statements • Get an understanding of the applications behavior • How often are individual SQL statements executing? • What is the performance of individual SQL statements? • Determine statistics for workload • Workload statistics advisor • More workload analysis features coming… (?) • Remeasure workload • Identify top tuning candidates • Use query based tools to further analyze (next session)
Creating workloads • Creating a workload • Tune a workload • View workloads • Monitoring functions
Workload sources • Workload sources • Snap statement cache • Catalog (static SQL) • QMF / QMF HPO • File • Categories • Other workloads
Package filter options • Package filter options • Collection id, name, owner, … • Can use equals, like, in, etc.
Plan filter options • Plan filter options • Plan name, plan creator, etc. • Can use equals, like, in, etc.
Cost & Object filter options • Cost and Object filters • Filters SQL within package / plan filter • Requires the static SQL be bound with explain yes. • DSN_STATEMNT_TABLE must already be populated. • Show only SQL with PROCSU > … • Show SQL which uses table… • Show SQL which uses index… • Choice to return rows which qualify for ANY or ALL of the cost / object filter conditions
Access path filters • Access path filters • Filters SQL within package / plan filter • Requires the static SQL be bound with explain yes. • PLAN_TABLE must already be populated. • Show SQL which performs… • Tablespace scan • Sort • Non-matching index scan • List prefetch • Outer join • ….
Capture the workload • After selecting packages / plans / filters… • Click finish to capture workload • OSC goes about the business of collecting the statements… • Queue Jeopardy music, get some coffee.