BWI User Group.ppt

654 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
654
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • This diagram illustrates the APPTUNE products major components: Data Collector Online Reports Batch Reports Administration The following slides describe each of the major components in more detail.
  • BWI User Group.ppt

    1. 1. Optimizing SQL Performance with BMC SQL Performance for DB2 Introduction and Technical Update
    2. 2. The Business Problem <ul><li>SQL Performance </li></ul><ul><ul><li>The most challenging problem in DB2 shops today </li></ul></ul><ul><ul><ul><li>Direct impact on meeting service level objectives </li></ul></ul></ul><ul><ul><ul><li>Direct impact on cost of ownership for the IT organization </li></ul></ul></ul><ul><ul><li>What makes it difficult? </li></ul></ul><ul><ul><ul><li>Dynamic Application Workloads </li></ul></ul></ul><ul><ul><ul><li>More and more dynamic SQL coming from distributed connections </li></ul></ul></ul><ul><ul><ul><li>SQL coding quality and validation </li></ul></ul></ul><ul><li>Why is this an even bigger deal today? </li></ul><ul><ul><li>IT Dynamics driving the problem </li></ul></ul><ul><ul><li>Trending toward more dynamic SQL = less control </li></ul></ul><ul><ul><li>Outsourced application development </li></ul></ul><ul><ul><li>Less staff </li></ul></ul><ul><ul><ul><li>People and experience to handle what is a complex task </li></ul></ul></ul>
    3. 3. <ul><li>Focus on individual SQL statements </li></ul><ul><ul><li>Do they meet “best practice” coding standards </li></ul></ul><ul><ul><li>Do they use expected/accepted DB2 access paths </li></ul></ul><ul><ul><li>Do they deliver desired result set in acceptable time with acceptable resource consumption </li></ul></ul><ul><li>Developed and tested in controlled environment </li></ul><ul><li>More predictive in nature </li></ul><ul><li>Focus on workload dynamics </li></ul><ul><ul><li>How does concurrent execution affect response time/resource consumption </li></ul></ul><ul><ul><li>Does this SQL statement/program collide with other transactions </li></ul></ul><ul><li>Real world un predictability comes into play </li></ul><ul><li>More focus on measuring the workload and rapidly reacting </li></ul>Analyzing and Tuning Your SQL - Sources of Information SQL Workload Atomic SQL                                                                                                                                                                                    
    4. 4. SQL Performance for DB2 The BMC Solution <ul><li>Solution Objectives </li></ul><ul><ul><li>Control or eliminate poorly performing SQL code </li></ul></ul><ul><ul><li>SQL performance problems identified and solved quickly </li></ul></ul><ul><ul><li>Proactive identification of inefficient SQL </li></ul></ul><ul><li>Solution Components </li></ul><ul><ul><li>APPTUNE captures and analyzes SQL execution metrics </li></ul></ul><ul><ul><li>SQL Explorer is the SQL analysis tool that extends far beyond the DB2 Explain </li></ul></ul><ul><ul><li>Index Analysis Component provides specific features for effectively managing DB2 indexes </li></ul></ul><ul><ul><li>Common Explain available in solution and point products </li></ul></ul>SQL Performance for DB2 Data Collector Index Component SQL Explorer for DB2 APPTUNE for DB2
    5. 5. SQL Performance for DB2 Solution Architecture
    6. 6. SQL Performance for DB2 Starting at the /top <ul><li>ASQEQRPW/P View a Report LINE 1 OF 7 </li></ul><ul><li>Command ====> _______________________________________________ Scroll ===> CSR_ </li></ul><ul><li>BMCSftwr.SQMCACTS -- SUBSYSTEM ANALYSIS (DATA) -- 08/27 14:36:58 </li></ul><ul><li>Source : V52A-ACTIVE Intvl : 08/27 00:00 - UNLIMITED More: + > </li></ul><ul><li>------------------------------------------------------------------------------- </li></ul><ul><li>Actions: G-AppGrps R-Programs C-ConnID T-Detail A-Averages O-Object </li></ul><ul><li>P-Plans U-Users S-Stmts E-SQL Errors L-CorrID </li></ul><ul><li>Actions for SAP systems: V-Server N-Work Process Number I-Work Process ID </li></ul><ul><li>AppGrp: User: ConnID: Plan: </li></ul><ul><li>CorrID: Program: Stmt No: </li></ul><ul><li>SQL +------- Total IN-SQL Time -------+ +- S </li></ul><ul><li>DB2 SSID MVS ID Calls Elapsed % CPU % Getpage Numb </li></ul><ul><li>---------- -------- ------ ----------------- ----------------- -------- ---- </li></ul><ul><li>+ DFH1 (8.1) SYSM 1815K 01:53.79476 96.1% 00:29.68631 99.9% 154104 1 </li></ul><ul><li>+ DFG1 (7.1) SYSO 74 00:04.67528 3.9% 00:00.02965 0.1% 778 </li></ul>Drilldowns aplenty Numerous drilldowns will take you into detail organized to your interest <ul><li>Key points </li></ul><ul><li>DB2 subsystems across your enterprise on a single screen </li></ul><ul><li>DB2s with highest elapsed times bubble to the top (generally the best place to start) </li></ul><ul><li>Results can be sorted on different field on display (getpages or CPU for example) with simple command </li></ul>Poor performance at the subsystem level
    7. 7. Which statement is using the most resources? SQL Text Objects Accessed Top three statements are using 90% of the CPU <ul><li>Key points </li></ul><ul><li>Top SQL statements in terms of total elapsed time sorted to top </li></ul><ul><li>Dynamic and Static SQL visible </li></ul><ul><li>Numerous drilldowns for additional detail </li></ul>S “S” again to see the SQL text
    8. 8. Here’s the SQL <ul><li>Key points </li></ul><ul><li>Provides extensive SQL statement execution detail on elapsed time, getpage activity, BP usage, lock events and CPU consumption </li></ul><ul><li>You can launch directly into a full-function explain from the common Explain function </li></ul>“ X” will invoke the common Explain function X
    9. 9. Let’s Explain the statement
    10. 10. Which DB2 Objects Are Used by this Statement?
    11. 11. APPTUNE for DB2 As a Troubleshooting Tool <ul><li>Current transaction problem ? </li></ul><ul><ul><li>Subsystem </li></ul></ul><ul><ul><li>Thread </li></ul></ul><ul><ul><li>Locking contention </li></ul></ul><ul><li>Do you have Distributed Applications? Do you need to identify the transaction by Workstation? </li></ul><ul><li>Need a way to report on application SQL errors? </li></ul>
    12. 12. APPTUNE for DB2 Active Threads Running …
    13. 13. SQL Error Analysis report
    14. 14. SQL Explorer for DB2 <ul><li>Explain function </li></ul><ul><ul><li>Online interactive tool </li></ul></ul><ul><ul><ul><li>See detail when you want to see it on statistics, predicates, access path, objects </li></ul></ul></ul><ul><ul><ul><li>Customize the layout of the data the way you want to see it </li></ul></ul></ul><ul><ul><ul><li>Get advice and tips from Explain rules </li></ul></ul></ul><ul><ul><ul><li>See visual comparison from editing SQL and re-explaining </li></ul></ul></ul><ul><ul><ul><li>See visual comparison of dynamic explain and BIND with EXPLAIN(YES) </li></ul></ul></ul><ul><ul><ul><li>Solution password enables Index Component analysis on cloned objects: </li></ul></ul></ul><ul><ul><ul><ul><li>Add one or more indexes </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Drop one of more indexes </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Update statistics on one or more indexes </li></ul></ul></ul></ul><ul><ul><li>Batch </li></ul></ul><ul><ul><ul><li>See summary and detail explain information for many packages, collection IDs, or plans. </li></ul></ul></ul><ul><ul><ul><li>Explain objects in batch and save to product history tables to be used in Compare </li></ul></ul></ul>
    15. 15. BMC Common Explain A Little More Detail Predicate Information
    16. 16. SQL Explorer for DB2 Additional Functionality <ul><li>Compare Access Paths from two points in time </li></ul><ul><ul><li>Compares on SQL Text , not statement number </li></ul></ul><ul><ul><li>Sets return code 8 if access path got worse </li></ul></ul><ul><ul><li>Shows differences in statistics that were used at the time of the Explain </li></ul></ul><ul><li>Mismatch Analysis </li></ul><ul><ul><li>Reports mismatches in data type or length that can affect access paths </li></ul></ul><ul><ul><li>Now incorporated into Explain Predicate report </li></ul></ul><ul><li>Impact Analysis </li></ul><ul><ul><li>Find all statements affected by a schema change </li></ul></ul><ul><li>DBRM/LOAD Library Compare </li></ul><ul><ul><li>Find mismatches in timestamps between DBRM and LOAD before you promote to production to avoid -805 / -818 SQL errors. </li></ul></ul><ul><li>Migrate Access Path Statistics </li></ul><ul><ul><li>Copy PROD statistics to TEST to get a better picture of the access paths </li></ul></ul><ul><li>Declarations Generator </li></ul><ul><ul><li>Generates null indicator variables to help avoid coding errors </li></ul></ul>
    17. 17. SQL Performance for DB2 – Index Component <ul><li>Collects predicate data </li></ul><ul><ul><li>Number of times a column was specified in a predicate and in what manner (Indexable Equal, Indexable Range) </li></ul></ul><ul><li>Collects I/O information for DB2 objects </li></ul><ul><ul><li>Inactive tables and inactive indexes </li></ul></ul><ul><ul><li>DB2 catalog statistics for tables and indexes </li></ul></ul><ul><ul><li>SQL statements associated with a table </li></ul></ul><ul><li>Collects index usage </li></ul><ul><ul><li>Percentage of getpages from indexes </li></ul></ul><ul><ul><li>SQL statements associated with a table </li></ul></ul><ul><li>Provides What-if Index analysis on cloned objects </li></ul><ul><ul><li>Add indexes </li></ul></ul><ul><ul><li>Drop indexes </li></ul></ul><ul><ul><li>Update statistics on indexes </li></ul></ul>
    18. 18. SQL Performance for DB2 – Index Component Table Access by GETPAGE/STMT Ratio report Data at statement level provide matrix of activity Activity against Objects
    19. 19. SQL Performance for DB2 – Index Component Table Access by GETPAGE/STMT Ratio report Enter M for Crud Matrix on the CR_Individual table This is the percentage of getpages from indexes
    20. 20. SQL Performance for DB2 – Index Component Table CRUD Matrix report Let’s look at the usage of this column in the workload captured
    21. 21. SQL Performance for DB2 – Index Component Table CRUD Matrix report – Column Detail
    22. 22. SQL Performance for DB2 – Index Component Drilldown to SQL Text <ul><li>The “X” option will launch the BMC Common Explain feature </li></ul><ul><li>Common Explain is an integrated common component used by a number of BMC products </li></ul><ul><li>Now we’ll proceed to the Explain function </li></ul>
    23. 23. BMC Common Explain What-if Index Analysis Using Cloning <ul><li>Now let’s look at modeling a new index that could provide a better access path </li></ul><ul><li>Common Explain uses a cloning technique that creates new objects or modifies existing objects </li></ul><ul><ul><li>Clones created in a BMC database so no DBD locks </li></ul></ul><ul><ul><li>Objects created with DEFINE NO </li></ul></ul><ul><ul><li>Objects not created till a dynamic explain is executed </li></ul></ul><ul><ul><li>Objects dropped upon exiting Explain </li></ul></ul><ul><ul><li>Index statistics can be modified </li></ul></ul><ul><ul><li>Index DDL can be saved or imported into the process </li></ul></ul>
    24. 24. BMC Common Explain What-if Analysis <ul><li>We’ve created a new index in this step and modified the statistics so the optimizer will have enough information </li></ul><ul><li>We can also delete existing indexes (deleted from the clone only) or update statistics data for existing indexes as well </li></ul><ul><li>Here is the index we created in the </li></ul><ul><li>previous step </li></ul><ul><li>Remember the index hasn’t </li></ul><ul><li>actually been created yet </li></ul><ul><li>Next step we’ll using the XD (Dynamic </li></ul><ul><li>Explain) to create the clone </li></ul>
    25. 25. BMC Common Explain What-if Analysis <ul><li>The new index has dramatically affected the access path and caused the Cost Rate for this statement to go down </li></ul><ul><li>More importantly, the access path went from a tablespace scan to a matching index access </li></ul><ul><li>With the new index the access path </li></ul><ul><li>changes dramatically </li></ul><ul><li>Meanwhile the cost of the statement </li></ul><ul><li>has gone down as well </li></ul><ul><li>DDL for creating this index can be </li></ul><ul><li>saved for later use </li></ul>
    26. 26. SQL Performance for DB2 3.3.00 Solution Update Generally Available November 9, 2006
    27. 27. SQL Performance 3.3.00 Technical Overview Release Highlights <ul><li>Reduce solution overhead </li></ul><ul><ul><li>Data Collector CPU and storage overhead </li></ul></ul><ul><ul><ul><li>Architectural changes mean overhead reductions </li></ul></ul></ul><ul><ul><li>Index Component overhead reduction </li></ul></ul><ul><ul><ul><li>Eliminate bind requirement </li></ul></ul></ul><ul><ul><ul><li>Streamline reporting to reduce/eliminate redundant reports </li></ul></ul></ul><ul><li>Deliver new filtering capabilities </li></ul><ul><ul><li>Exception only reporting (XOR) </li></ul></ul><ul><ul><li>Increased number of collection keys </li></ul></ul><ul><ul><li>Increased flexibility in defining exceptions and reducing overhead </li></ul></ul>
    28. 28. SQL Performance for DB2 3.3 Filtering Enhancements <ul><li>Extensive work on current filtering capabilities to: </li></ul><ul><ul><li>Deliver more filtering functionality </li></ul></ul><ul><ul><li>Make filtering easier to use </li></ul></ul><ul><ul><li>Enable new XOR option </li></ul></ul><ul><ul><ul><li>Discussed later </li></ul></ul></ul><ul><li>Functional enhancements </li></ul><ul><ul><li>Exceptions on GETPAGES, SQL Codes, Timeout/Deadlock Occurrences, Synchronous I/O Counts </li></ul></ul><ul><ul><ul><li>In addition to existing exceptions (Elapsed and CPU times) </li></ul></ul></ul><ul><ul><li>Ignore the literal in dynamic SQL statements where the rest of the statement is the same </li></ul></ul><ul><ul><ul><li>Treats SQL statement as a single statement </li></ul></ul></ul><ul><ul><li>New collection keys </li></ul></ul><ul><ul><li>Change collection items without cycling Data Collector (through filters) </li></ul></ul>
    29. 29. New Collection Options Panel <ul><li>Simple means to turn off collection for </li></ul><ul><li>qualifiers </li></ul><ul><li>New collection keys </li></ul>
    30. 30. New Collection Options Exception only roll-ups <ul><li>Triggers exception only reporting </li></ul><ul><li>Idea is to minimize collection overhead </li></ul><ul><li>for stable applications with minimal </li></ul><ul><li>monitoring requirements </li></ul><ul><li>Resource saving options specified as part </li></ul><ul><li>of individual filter so they can be applied to </li></ul><ul><li>specific portions of the workload </li></ul><ul><li>Combined with other collection options to </li></ul><ul><li>create a tailored profile for applications </li></ul>
    31. 31. New Collection Options Identifying Exception Criteria <ul><li>Specifies exceptions on Elapsed and CPU </li></ul><ul><li>time, Negative SQL code, Deadlocks and </li></ul><ul><li>Timeouts, and synchronous I/O Counts </li></ul><ul><li>Exception records will be cut for each of </li></ul><ul><li>the exceptions that occur </li></ul><ul><li>Specifies collection of host variable values </li></ul>
    32. 32. New Collection Options Filter Profile Definition for Legacy Applications <ul><li>Exception-only reporting (XOR) specified </li></ul><ul><li>for programs (ACCT*) and plan (KAD4050) </li></ul><ul><li>No collection at all for payroll program - </li></ul><ul><li>PAYR650 </li></ul>
    33. 33. New Collection/Filtering Options Identifying Filters in Place for a Specific Interval <ul><li>Allows user to identify collection/filtering options </li></ul><ul><li>in place during a specific interval </li></ul><ul><ul><li>Based on current profile </li></ul></ul>
    34. 34. New Collection/Filtering Options Details on Active Filters <ul><li>Collection options in place at time of interval </li></ul>
    35. 35. New Collection/Filtering Options Drilling Into Exceptions
    36. 36. New Collection/Filtering Options Exception Analysis
    37. 37. Exception Analysis Exception Detail
    38. 38. Exception Analysis Exception Detail w/Host Variables
    39. 39. <ul><li>Improvements in reporting on Query Parallelism </li></ul><ul><li>PSSBLOAD – Utility for loading APPTUNE performance data to DB2 tables for analysis </li></ul><ul><li>PSSEXTRC – Explain and compare dynamic SQL access paths across time or DB2 releases </li></ul>Additional SQL Performance Enhancements
    40. 40. <ul><li>Load performance data into DB2 for analysis </li></ul><ul><ul><li>Historical performance trends —You might want to know which SQL statements had the highest CPU in a given month, or which statement had the highest number of executions during a batch window. </li></ul></ul><ul><ul><li>Audit database —You might want to know which users accessed a particular table, or which users tried to access unauthorized tables. </li></ul></ul><ul><ul><li>Impact Analysis —You might want to identify the programs, statement numbers, and SQL text that accessed a particular table. </li></ul></ul><ul><li>How’s it work </li></ul><ul><ul><li>Reads archived trace data sets containing SQL performance data </li></ul></ul><ul><ul><li>Extracts the BMC IFCID data from the archives </li></ul></ul><ul><ul><ul><ul><li>SQL Text </li></ul></ul></ul></ul><ul><ul><ul><ul><li>SQL Errors (SQLCA) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>SQL Statement Summary </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Object Statistics (per statement) </li></ul></ul></ul></ul><ul><ul><li>Creates output data sets used for loading into DB2 tables </li></ul></ul>PSSBLOAD: Loading APPTUNE data into DB2 Tables
    41. 41. Summary <ul><li>SQL Performance for DB2 3.3 available November 9 th </li></ul><ul><ul><li>APPTUNE 5.3 </li></ul></ul><ul><ul><li>SQL Explorer for DB2 5.3 </li></ul></ul><ul><li>Significant reduction in Data Collector overhead </li></ul><ul><ul><li>For APPTUNE and Index Component </li></ul></ul><ul><li>New functionality in managing collection keys and filters </li></ul><ul><li>Continued investment in BMC’s DB2 solutions </li></ul><ul><li>Continued focus on things that differentiate BMC </li></ul><ul><ul><li>World class support </li></ul></ul><ul><ul><li>Innovative technology that solves critical business issues </li></ul></ul><ul><ul><li>Strong financial condition </li></ul></ul>

    ×