Performance Tuning BI on SAP NetWeaver Using DB2 for i5/os and i5 Navigator

Similar documents
Industry Leading BI Performance With System i and DB2 for i5/os Using BI on SAP NetWeaver. Susan Bestgen System i ERP SAP team

SAP NetWeaver BW Performance on IBM i: Comparing SAP BW Aggregates, IBM i DB2 MQTs and SAP BW Accelerator

IBM. Database Database overview. IBM i 7.1

IBM i Version 7.2. Database Database overview IBM

High Availability Options for SAP Using IBM PowerHA SystemMirror for i

Multidimensional Grouping Made Easy

HANA Performance. Efficient Speed and Scale-out for Real-time BI

System i5: Maximizing Performance and Availability

IBM i 7.3 Features for SAP clients A sortiment of enhancements

... Creating and using materialized query tables (MQT) in IBM DB2 for i5/os. Version 2.0

Behind the Glitz - Is Life Better on Another Database Platform?

Cognos Dynamic Cubes

IT Best Practices Audit TCS offers a wide range of IT Best Practices Audit content covering 15 subjects and over 2200 topics, including:

IBM and Centerfield Technology

Performance Tuning with the OLAP Cache

What happens when SQL. packages get. full? Are there other times when an SQL package can become unusable? When should I delete SQL. packages?

1Z Oracle Database Performance and Tuning Essentials 2015 Exam Summary Syllabus Questions

Performance Optimization for Informatica Data Services ( Hotfix 3)

... Performance benefits of POWER6 processors and IBM i 6.1 for Oracle s JD Edwards EnterpriseOne A performance case study for the Donaldson Company

IBM DB2 for z/os Application Developer Certification

Understanding the TOP Server ControlLogix Ethernet Driver

Senior Technical Specialist, IBM. Charles Price (Primary) Advisory Software Engineer, IBM. Matthias Falkenberg DX Development Team Lead, IBM

Information Design Tool User Guide SAP BusinessObjects Business Intelligence platform 4.0 Support Package 4

... IBM Advanced Technical Skills IBM Oracle International Competency Center September 2013

Using SAP NetWeaver Business Intelligence in the universe design tool SAP BusinessObjects Business Intelligence platform 4.1

ORACLE PL/SQL DATABASE COURSE

Db2 Data Access with PHP on IBM i

IBM Technical Brief. IBM System z9 ziip Measurements: SAP OLTP, BI Batch, SAP BW Query, and DB2 Utility Workloads. Authors:

With the growth of data, the reduction in of DBA staffing, tight budgets, and the business goal to be 24x7 it is becoming more important to automate

Product Documentation. DB Optimizer. Evaluation Guide. Version Published November 27, 2009

15 Minute Tip Talk April 10, 2018 Intro to Formatted Search

Arrays are a very commonly used programming language construct, but have limited support within relational databases. Although an XML document or

OLAP Drill-through Table Considerations

... WebSphere 6.1 and WebSphere 6.0 performance with Oracle s JD Edwards EnterpriseOne 8.12 on IBM Power Systems with IBM i

IBM Application Runtime Expert for i

SQL Studio (BC) HELP.BCDBADASQL_72. Release 4.6C

Chapter. Storeroom Module. Table of Contents

Concurrent execution of an analytical workload on a POWER8 server with K40 GPUs A Technology Demonstration

Oracle In-Memory & Data Warehouse: The Perfect Combination?

Chapter 5 Managing the Data

Embarcadero DB Optimizer 1.5 New Features Guide. Published: March 16, 2009

IBM FileNet Content Manager 5.2. Asynchronous Event Processing Performance Tuning

Best Practices. Deploying Optim Performance Manager in large scale environments. IBM Optim Performance Manager Extended Edition V4.1.0.

What is Real Application Testing?

Manual Trigger Sql Server 2008 Insert Update Delete Selection

Morningstar Advisor Workstation SM Quick Start Guide

Oracle 1Z Oracle Database 11g Release 2- SQL Tuning. Download Full Version :

Morningstar Advisor Workstation SM Quick Start Guide

Fastrack to federated replication

Migrate from Netezza Workload Migration

Guide Users along Information Pathways and Surf through the Data

COPYRIGHTED MATERIAL. Using SQL. The Processing Cycle for SQL Statements

Graphical debugging makes procedural SQL debugging on IBM i even easier

... IBM Power Systems with IBM i single core server tuning guide for JD Edwards EnterpriseOne

Teradata Analyst Pack More Power to Analyze and Tune Your Data Warehouse for Optimal Performance

Triangle SQL Server User Group Adaptive Query Processing with Azure SQL DB and SQL Server 2017

Integrating with Microsoft Visual Studio Team System. For Borland CaliberRM Users

Lawson M3 7.1 Large User Scaling on System i

Creating Reports using Report Designer Part 1. Training Guide

Intelligent Caching in Data Virtualization Recommended Use of Caching Controls in the Denodo Platform

Migrate from Netezza Workload Migration

API Gateway Version September Key Property Store User Guide

Performance Tuning in SAP BI 7.0


Configuration changes such as conversion from a single instance to RAC, ASM, etc.

Introduction to IBM Rational HATS For IBM System i (5250)

FIVE BEST PRACTICES FOR ENSURING A SUCCESSFUL SQL SERVER MIGRATION

A Solution in Transition: Installing SAP s Solution Manager 4.0. on DVDs, you can download the software from

Intel Xeon Scalable Family Balanced Memory Configurations

MILOŠ RADIVOJEVIĆ, PRINCIPAL DATABASE CONSULTANT, BWIN GVC, VIENNA, AUSTRIA

SAP BPC 5.0 & 5.1 Performance and Reliability tips

Built for Speed: Comparing Panoply and Amazon Redshift Rendering Performance Utilizing Tableau Visualizations

University of Wisconsin System SFS Business Process RPT Basic PeopleSoft Query

7 BEST PRACTICES TO BECOME A TABLEAU NINJA FOR OBIEE

Embarcadero DB Optimizer 1.5 Evaluation Guide. Published: March 16, 2009

TECHNOLOGY: Testing Performing Through Changes

... Characterizing IBM Power Systems POWER7+ and Solid State Drive Performance with Oracle s JD Edwards EnterpriseOne

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting

DB2 for z/os Stored Procedure support in Data Server Manager

Xton Access Manager GETTING STARTED GUIDE

The strategic advantage of OLAP and multidimensional analysis

Day 1 Agenda. Brio 101 Training. Course Presentation and Reference Material

Hyperion Interactive Reporting Reports & Dashboards Essentials

Course Outline. [ORACLE PRESS] All-in-One Course for the OCA/OCP Oracle Database 12c Exams 1Z0-061, 1Z0-062, & 1Z

Course Outline. [ORACLE PRESS] All-in-One Course for the OCA/OCP Oracle Database 12c Exams 1Z0-061, 1Z0-062, & 1Z

Data is moving faster than ever, the volume of data is exploding, the

University of Wisconsin System SFS Business Process RPT Intermediate PeopleSoft Query

How can a Reference Query Be used?

Oracle Hyperion Tips and Tricks. NEOAUG Eric Sanders, Gordon Strodel Monday, October 22, 2012

Embarcadero PowerSQL 1.1 Evaluation Guide. Published: July 14, 2008

Quest Central for DB2

How to Transfer Data from AS400 to BW using DB Connect

Oracle Database 12c: Performance Management and Tuning

Teiid Designer User Guide 7.5.0

SAP SD Benchmark with DB2 and Red Hat Enterprise Linux 5 on IBM System x3850 M2

How To...Use a Debugging Script to Easily Create a Test Environment for a SQL-Script Planning Function in PAK

SQL Gone Wild: Taming Bad SQL the Easy Way (or the Hard Way) Sergey Koltakov Product Manager, Database Manageability

ziip and zaap Software Update

Advancing your SAP Solutions A review of future options around SAP on IBM i and SAP HANA

Oracle 1Z0-515 Exam Questions & Answers

Transcription:

Performance Tuning BI on SAP NetWeaver Using DB2 for i5/os and i5 Navigator Susan Bestgen System i ERP SAP team

System i TM with DB2 for i5/os TM leads the industry in SAP BI-D and SAP BW benchmark certifications with ten #1 certifications in the past two years. The article Industry Leading BI Performance With System i and DB2 for I5/OS Using BI on SAP NetWeaver describes the implementation of BI on SAP NetWeaver TM on System i and discusses technology features of DB2 1 which contribute to its performance success in the BI (Business Intelligence) technology segment. While hardware and software technology are key, performance improvements can almost always be achieved with intelligent tuning. This article is a follow-on to the aforementioned article and provides a step by step performance tuning scenario of the SAP BI-D benchmark queries using i5 Navigator. Examples examined include: Filtering plan cache statements to identify expensive queries Using Visual Explain to graphically illustrate query implementation Measuring impact of relevant indexes and MQTs for performance of BI queries Utilizing DB2 s Index Adviser While the examples used were specific to the BI-D benchmark queries, the steps performed and suggestions offered could apply to any application which generates similar queries. iseries Navigator Database Tools Optimal performance of BI queries relies on many factors. Size of the underlying tables, complexity of the query, existence of indexes, sophistication of the query optimizer, hardware configurations and other factors all play a role in the performance of any given query on the system. The nature of Business Intelligence is such that many queries are 'ad hoc, generated on the fly as the end user defines how the business data available should be summarized to yield the desired results necessary for making business decisions. In general, most SAP BI queries perform well on i5/os due to the design of the SAP database (containing appropriate indexes for most queries), SAP design features which capitalize on the strengths of DB2, and the capabilities of DB2 to optimize complex ad hoc BI type queries. However, any database application can benefit from additional analysis and tuning, so database supplied analysis tools are key. I5/OS provides powerful performance analysis and tuning tools available through iseries Navigator 2, a sub-component of the IBM iseries Access. 1 All references to DB2 in this article imply function at release level V5R4 for DB2 for i5/os. 2 For information on obtaining and installing iseries Navigator, vist http://www-03.ibm.com/servers/eserver/iseries/navigator/ for product information, http://w3.ibm.com/support/techdocs Page 2 of 31

The goal of the SAP BI-D benchmark is to achieve the maximum throughput (measured by SAP in number of dialog steps per hour) while executing the defined set of benchmark queries. For a database platform, this translates into optimizing the set of queries to minimize response time, which is a factor of both CPU, I/O and response time, while maximizing CPU utilization across the system. The software platform, and specifically the database solution, may use any generally available tools, tunings and techniques to achieve optimal results. Thus, the first step in database tuning is to identify and analyze the longest running queries. iseries Navigator makes this a simple task. The screen shots that follow were generated running iseries Navigator after the BI-D benchmark had been run on the System i server. The first screen of iseries Navigator allows the user to work with multiple systems to manage system functions, including database performance. DB2 has a built in SQL plan cache, which automatically captures a wealth of information on SQL statements run on the system. There are no monitors to turn on or external tools to run; the plan cache is always active and able to provide detailed analysis information and tuning tips for the queries active in the cache. First, we select the option to show statements in the plan cache (Figure 1): Figure 1: Initial iseries Navigator screen downloads, FAQs, service packs and more. http://w3.ibm.com/support/techdocs Page 3 of 31

This brings up a screen which allows us to filter the queries in the plan cache to those of most interest. The filter can include criteria such as those with the longest run time, those most frequently executed, queries run after a specified date/time, or any of the other options on this screen. For this example, we will limit the result set to those queries run after a certain time period that specify the tables known to be queried in the BI-D benchmark (the SQL statement text contains FBENCH ). This results in a set of twelve queries, with high level information about the performance of the queries. As each query is highlighted, the SQL statement text of the query is displayed at the bottom of the screen (Figure 2): Figure 2: Filtered SQL Statements The first query is a candidate for further analysis, as it has both the most expensive time (in seconds), and also the longest total processing time for the five runs of the query. By selecting the Show Longest Runs button at the bottom of the screen, we see http://w3.ibm.com/support/techdocs Page 4 of 31

additional detail about each logged run of this query. In this example, the processing time seems to increase as the number of records returned by the query increases (Figure 3): Figure 3: Show longest runs of the selected query The next logical step is to close this longest runs window and chose to Visual Explain the query (Figure 4): http://w3.ibm.com/support/techdocs Page 5 of 31

Figure 4: Selection of the Visual Explain button This powerful tool not only gives a quick graphical overview of the query implementation, but it provides a wealth of optimization detail about each step of the query optimization and implementation (Figure 5). While we will not dig deeply into how this query was implemented, the graph alone illustrates it is a complex query with many nodes, all of which represent processing steps necessary to perform the query. A check of the SQL statement text at the bottom of the screen indicates a multiple file join query was run. Note that the query graph font has been reduced in size to illustrate the query graph complexity in a single page. Not all of the detail at each node of the graph can be read, but the detail is not necessary at this stage. http://w3.ibm.com/support/techdocs Page 6 of 31

Each node indicates a step of the query processing Query optimization details, of which only a subset are displayed SQL Statement Text Figure 5. Visual Explain output of the selected query At this point, some decisions can be made regarding the performance of the query. Is it likely to be run again, would performance be improved with tuning, or does it need to run any faster? If the query is one that will be run multiple times and performance improvement is desired, then further analysis is warranted. For benchmark purposes, we know the query is one that will be run over and over - the benchmark is driven by a tool that simulates many users running a defined set of queries repeatedly. This query will be run many times where the only thing that changes is the selection criteria. While query optimization can be a complex topic, improved query performance is usually achieved by providing the right tools for the query optimizer. Optimizer tools can include statistical information which helps the optimizer derive informed plans or additional objects which provide statistics and/or a means to reduce the work done to retrieve the query answer set. Two such objects to consider include indexes and MQTs (Materialized Query Tables, which are sometimes called automatic summary tables or materialized views). http://w3.ibm.com/support/techdocs Page 7 of 31

Indexes can provide additional statistical data and speed up query performance. An index over a table provides a fast method to find and retrieve table entries based on an index key value. Indexes are normally much smaller than the tables they are built over, so performance is improved by reducing the amount of data paged into memory. They provide a fast means of performing any record selection over key fields. Records can be retrieved in the order needed if they index keys match ordering, grouping or joining criteria, which can greatly reduce CPU needed to build an answer set. Indexes are associated with a single database table, so their existence improves the performance of data accessed for that table only. MQTs are DB2 tables that contains the results of a query, along with the query s definition. The stored results of an MQT can be substituted into the query s implementation by the query optimizer for part or all the results requested by the query if the MQT is a match to the query or contains a superset of the results of the query. A matching MQT implies the MQT definition contains a subset of the selection criteria specified in the query and it therefore holds a superset of the applicable records needed by the query. They have the potential to greatly improve response time for complex queries by precomputed results for complex tasks such as joins, grouping functions, and selection. In our example, we have a complex join which returns a fairly large number of records (around 44,000 for the larger result sets). While indexes certainly can improve the performance of join queries by speeding access to each individual table, the best option to improve performance is to reduce or eliminate the work done to perform the join. MQTs are perfectly suited for complex BI queries over large amounts of data which join many files. In this example, an MQT can eliminate the expensive join processing and effectively reduce the final query to a single table query over the MQT. Additional selection and/or grouping which changes with each run of the query will be applied to the MQT result set automatically by the query optimizer. For simplicity in creating the desired MQT for this example, we first copy the SQL statement text from the bottom of the Visual Explain screen into the clipboard. Then, from the main screen of iseries Navigator, we can start an interface that will allow us run the SQL statement to create the MQT (Run SQL Scripts, Figure 6): http://w3.ibm.com/support/techdocs Page 8 of 31

Figure 6. Initiate Run SQL Scripts After copying the SQL text into the Run SQL Scripts screen, it can be edited to have the criteria needed for the MQT creation. The original statement is as follows (Figure 7): http://w3.ibm.com/support/techdocs Page 9 of 31

Figure 7. Original statement text copied to the Run SQL Scripts screen http://w3.ibm.com/support/techdocs Page 10 of 31

The steps needed to convert the SQL statement into one that creates an MQT 3 which can be used to implement the query is summarized below and illustrated in Figure 8. First, the CREATE TABLE clause is added, with the set of fields that must be present in the MQT specified. All fields in the SELECT clause of the original query are kept, and any fields from the WHERE clause where the selection criteria will change from run to run of the query are included so this selection can be performed at the MQT level. For this example, these additional fields would be: DISTR_CHAN DIVISION INDUSTRY The join criteria of the MQT stays the same as the join criteria in the original query. In the WHERE clause, only selection which will not change from run to run of the query is built into the MQT definition. The rest of the WHERE clause record selection is removed. The selection built into the MQT for our example would be: "DP"."SID_0CHNGID" = 0 AND "DP". "SID_0RECORDTP" = 0 AND "DP"."SID_0REQUID" <= 152 AND "X1"."OBJVERS" = UX'0041' AND "X2"."OBJVERS" = UX'0041' NOTE: In many cases selection in the MQT is limited to the join criteria only, as local selection containing literal values, such as these, can also change. Limit local selection in an MQT to values you know will not likely change in the queries. Grouping fields include the original grouping fields plus any selection (WHERE clause) fields that can change between query runs (add as grouping fields any columns added in the SELECT list). DISTR_CHAN DIVISION INDUSTRY We also specify that the MQT be populated with data immediately, refreshes are deferred and controlled by the user, and the MQT should be made available for query optimization. 3 For complete statement syntax rules and a description of MQT options, refer to the DB2 for i5/os SQL Reference, which can be found at http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp. http://w3.ibm.com/support/techdocs Page 11 of 31

Finally, the statement can be Run (Figure 8), and the MQT will be created on the database server. For more detailed information about defining MQTs for expensive queries, refer to Creating and using materialized query tables (MQT) in IBM DB2 for i5/os TM. Indexes are optional, but as with any good performance tuning situation, they should be considered over the MQT. It is a good idea to provide indexes over the record selection fields, starting with those fields which are most selective. The statement text to create two of our desired indexes looks like: CREATE INDEX R3B40DATA/MQT0716I01 ON R3B40DATA/MQT0716000 (DISTR_CHAN, DIVISION, INDUSTRY) CREATE INDEX R3B40DATA/MQT0716I02 ON R3B40DATA/MQT0716000 (DISTR_CHAN, DIVISION, STAT_CURR, MATL_TYPE, CALMONTH, VERSION, SALESORG) http://w3.ibm.com/support/techdocs Page 12 of 31

Create table clause Added WHERE clause selection fields Selection which does not change from run to run Additional grouping fields MQT definition attributes Figure 8. Original query altered to create the desired MQT http://w3.ibm.com/support/techdocs Page 13 of 31

Now we can see the performance impact of creating an MQT and its indexes for the complex BI query. The benchmark has been executed again, and we again view the plan cache results for a specific start time with statements that contain FBENCH. We can see the vast improvement in both the most expensive time and total time (Figure 9): Figure 9. Plan cache results running again with the new MQT A quick look at the longest runs further illustrates the point (Figure 10). Processing to retrieve 40,000+ records is now 12-13 seconds, as compared to 100 seconds or more previously. Figure 10. Response times for the selected query http://w3.ibm.com/support/techdocs Page 14 of 31

To verify the new MQT is being used, we can perform a Visual Explain (Figure 11). This much simplified query graph illustrates a single table - the MQT just created - is being queried (the Table Probe node), and it uses index and ing/or ing to retrieve the desired rows from the MQT. Articles Indexing and Statistics Strategies for DB2 UDB for iseries and The Power and Magic of LPG provide additional information on indexing strategies. MQT used Index and ing/or ing Figure 11. New Visual Explain output of the selected query Another powerful feature of Visual Explain is the Index Advisor. We ll look at another query where performance can be improved by adding an index. Back at the statement overview screen on a subsequent run, the second query is selected for analysis (Figure 12): http://w3.ibm.com/support/techdocs Page 15 of 31

Figure 12. Selecting a second query for analysis The top run times for this query, while fairly fast at less than 2 seconds, are as follows (Figure 13): Figure 13. Individual run times for the selected query Even though the response times are not excessive, we can Visual Explain the query to see if improvements can be made (Figure 14). At this point, the query graph tells us an MQT has been used to satisfy this join query (the Table Probe node using MQT0708000), and an index over the MQT was also used (the Index Probe node). We http://w3.ibm.com/support/techdocs Page 16 of 31

can see if any indexes are advised by the query optimizer that might improve the response time of this query by using the Index Advisor button, which is the last button in the task bar. Index advisor button MQT used Index used Figure 14. Visual explain for the selected query and Index Advisor selection The next display shows that one index is advised, and the optimizer indicates which file the index should be created over, what key fields are advised, and what type of index is recommended (either Binary Radix or EVI). In this case, it advises a binary radix index over MQT named MQT0708000 with 6 key fields (Figure 15): http://w3.ibm.com/support/techdocs Page 17 of 31

Figure 15. Results of index advisor and recommended key fields From here, we can click on Create. On the displayed screen, we simply fill in the desired name of the index (MQT0708I02) and press OK (Figure 16). iseries Navigator connects to the database server and creates the desired index. Figure 16. Create index based on Advisor http://w3.ibm.com/support/techdocs Page 18 of 31

The last step of this exercise is to measure the results. Again, we refresh the main screen of queries with the updated time of the last set of runs and find the same query we have just performance tuned (Figure 17): Figure 17. Result of rerunning with the new index and selected the desired query A quick look at the individual run times shows the response time improvement, from 1-2 seconds down to a maximum of.02 seconds (Figure 18): Figure 18. Runtimes for the selected query http://w3.ibm.com/support/techdocs Page 19 of 31

The Visual Explain can verify the newly created index was, in fact, used to implement the query and improve the response time. First we highlight the Index Probe node, then right click to select the option to display index information (Figure 19): Figure 19. Visual explain of the query Here we can verify the newly created index (MQT0708I02) was, in fact, the index used to implement this query (Figure 20): http://w3.ibm.com/support/techdocs Page 20 of 31

Figure 20. Verifying the new index was used Additional Index Advisor Capabilities Index Advisor can helpful in more generic tuning situations as well. Our previous example assumed some knowledge of the file names of interest in the SQL statements. In most tuning situations, one would look at a performance across the entire system or within a specific library, or database schema, to further analyze performance. Index Advisor can aid in both of these situations. Back at the main iseries Navigator screen, we look at the Database options available. A system generated relational database entry name provides a system level view of iseries Navigator options. If you have multiple IASPs (independent auxiliary storage pools), there will be one system relational database entry name per IASP. Selecting the system level name gives the index advisor options available (Figure 21): Index Advisor: View all indexes advised across the entire system Clear All Advised Indexes: A reset function to clear the list of advised indexes Condense Advised Indexes: Combines index advised at the table level by comparing the index advised keys. Index advised records whose keys are a subset http://w3.ibm.com/support/techdocs Page 21 of 31

of other indexed advised records are all rolled up to the superset of keys over the table which would satisfy all indexed advised queries over the table. Prune Advised Indexes: Removes all advised index entries for objects which no longer exist. System level Index Advisor options Figure 21. Index Advisor at the system level If the system view is too global and you d like to focus on a specific database schema, the same options are available by first selecting the schema of interest, then right clicking to select index advisor, and finally picking the index advisor option of interest (Figure 22). http://w3.ibm.com/support/techdocs Page 22 of 31

Database level Index Advisor options Figure 22. Index Advisor at the database schema level At an even more selective level, you can first select the schema of interest and expand to view its list of objects. From there, by selecting the tables in the schema, the entire list of tables is retrieved. A specific table can be selected, and again there are options to see the indexes advised, to clear the advised list, or to condense the list (Figure 23). http://w3.ibm.com/support/techdocs Page 23 of 31

Index Advisor options at the table level Figure 23. Index Advisor at the table level For this example, we ll go back to the database schema level and clear the index advised list. Next, we ll run our test and then view what indexes are advised within the scope of the benchmark. So, the option selected is R3B40DATA (schema name) -> Index Advisor -> Clear All Advised Indexes (Figure 24). Figure 24. Clear all advised indexes at the database schema level http://w3.ibm.com/support/techdocs Page 24 of 31

After running our test, and selecting Index Advisor at the schema level, the resulting screen provides information on indexes advised by the query optimizer for just those SQL statements which were executed during the benchmark run. At the bottom of the screen, we can see the optimizer advises indexes over sixty-nine unique objects. Detail information for each object in the list includes the name of the object (both long and short), along with the keys advised, the type of index, how many times an index was advised, rows in the table when advised, query estimate times, and other information (Figure 25). Figure 25. Schema level indexes advised after a clear and run of the benchmark At this point, one can select a specific table and choose options to create the recommended index, remove this table from the list, or show the SQL statement(s) which generated the index advised (Figure 26). If choosing to create the recommended index, the prefilled index creation screen would appear, much like Figure 16. http://w3.ibm.com/support/techdocs Page 25 of 31

Figure 26. Table level statement display for index advised When choosing to show the SQL statements, iseries Navigator will prefill the plan cache filter screen to select only those queries over the desired object which have an index advised (Figure 27). Retrieving those statements would return a list of statements like those shown in Figure 2. One can then examine statements in detail and view Visual Explain on those statement to determine if creating the advised index is desired. http://w3.ibm.com/support/techdocs Page 26 of 31

Figure 27. SQL Plan cache filter for the index advised statements over the selected table Conclusion Performance tuning strategies like index and MQT creation can greatly improve individual query performance. As demonstrated in the examples above, iseries Navigator simplies the task of finding the queries, determining how they might be improved, and then validating and measuring the results of any changes. These examples highlight only a subset of the power of iseries Navigator to identify and performance tune queries. Much more detailed information is available in Visual Explain. The reader can reference the list at the end of this article for additional information on how to improve performance using information available via iseries Navigator. http://w3.ibm.com/support/techdocs Page 27 of 31

Special Notices Performance is based on measurements using standard SAP benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve throughput or performance improvements equivalent to the ratios stated here. Any references in this information to non-ibm Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. http://w3.ibm.com/support/techdocs Page 28 of 31

For More Information 5 Essential Ways to Use iseries Navigator - SQL Plan Cache http://www.systeminetwork.com/artarchive/20803/5_essential_ways_to_use_iseries_n avigator SQL_Plan_Cache.html 5 Essential Ways to Use iseries Navigator Visual Explain http://www.systeminetwork.com/artarchive/20791/5_essential_ways_to_use_iseries_n avigator Visual_Explain.html Creating and using materialized query tables (MQT) in IBM DB2 for i5/os http://ibm.com/servers/enable/site/education/wp/438a/438a.pdf Indexing and Statistics Strategies for DB2 UDB for iseries http://ibm.com/servers/enable/site/bi/strategy/strategy.pdf Industry Leading BI Performance with System i and DB2 for i5/os using BI on SAP NetWeaver http://w3.ibm.com/support/techdocs/atsmastr.nsf/webindex/wp101087 The Power and Magic of LPG http://www.mcpressonline.com/mc?1@127.qqq0cfsnjgb.18995@.6b21733d!sectionid=.5bfbae44 Reviewing DB2 for i5/os query optimizer and database engine feedback mechanisms http://ibm.com/developerworks/systems/library/es-db2i5os/index.html SAP NetWeaver TM Business Intelligence http://www.sap.com/platform/netweaver/components/bi/index.epx SQL Performance Diagnosis on IBM DB2 Universal Database for iseries http://www.redbooks.ibm.com/redbooks/pdfs/sg246654.pdf Star Schema Join Support within DB2 for i5/os - Version 3 http://ibm.com/servers/enable/site/education/abstracts/16fa_abs.html http://w3.ibm.com/support/techdocs Page 29 of 31

About the Author Susan Bestgen has worked for IBM Rochester for 19 years. She began her career in database development, focussing on query optimization. For the past 11 years she has worked on the IBM ERP team. She helped with the initial product port of SAP to System i, designing and implementing functional and performance enhancements to the database interface. She currently works on benchmarking and performance of System i with SAP NetWeaver. Acknowledgments The author would like to thank the following people for their technical and editorial comments: IBM Rochester: Rob Bestgen, DB2 for i5/os SQE Chief Architect Michael Cain, DB2 for i5/os Center of Competency Chair Kolby Hoelzle, i5/os Development, SAP on System i Ron Schmerbauch, i5/os Development, SAP on System i Steve Tlusty, i5/os Development, SAP on System i IBM Germany Eric Kass, i5/os Development, SAP on System i Anja Winkler, SAP BI Consultant, SAP NetWeaver BI on System i SAP Germany Dorothea Rink, Senior Developer, Sap NetWeaver on System i Axel Stein, Development Architect, Sap NetWeaver BI on System I http://w3.ibm.com/support/techdocs Page 30 of 31