DB2 for z/os Optimizer: What have you done for me lately?

Size: px
Start display at page:

Download "DB2 for z/os Optimizer: What have you done for me lately?"

Transcription

1 Session: A08 DB2 for z/os Optimizer: What have you done for me lately? Terry Purcell IBM Silicon Valley Lab 14 th October :45 17:45 Platform: DB2 for z/os You can always read about the features/enhancements of a new release, such as DB2 9 for z/os, in the manuals, in redbooks or by attending highlight presentations. But what you generally miss from these sources is the answer to your question, "Why do I care about these enhancements?". And if there is one key DB2 focal area that needs extra explanation, it is the optimizer. This presentation will deep dive into some of the key SQL performance enhancements delivered recently in DB2 for z/os. 1

2 Introduction Most important to discuss Enhancements that require you to act OR Enhancements that provide a compelling reason to migrate or apply maintenance Main themes continue with each release Ongoing improvements to cost formulas Open up new access path choices Increase access path stability 2 2

3 Agenda V8 highlights Anything new for V8? What about DB2 9 enhancements in V8? DB2 9 highlights Any other stuff we don t tell you about? 3 3

4 V8 Optimizer Highlights RUNSTATS enhancements Frequency/Correlation on any column(s) Indexability for mismatched datatype/length Visual Explain With Statistics Advisor & Service SQL Page range screening enhancements Support for host vars and multi-column 4 4

5 V8 Optimizer Highlights MQTs Reduced prepare for complex statements Star Join enhancements In-memory index for materialized workfiles REOPT(ONCE) for dynamic SQL VOLATILE table support 5 5

6 V8 Optimizer Highlights Backward index scan VARCHAR index improvements Index-only access Variable length index keys Alter clustering index 6 6

7 V8 SQL Highlights 225 tables in a SQL statement 2MB statements GROUP BY expression ORDER BY within Singleton SELECT Multiple DISTINCT clauses SELECT from INSERT Common Table Expressions Recursive SQL Subquery in the SELECT list 7 7

8 Agenda V8 highlights Anything new for V8? What about DB2 9 enhancements in V8? DB2 9 highlights Any other stuff we don t tell you about? 8 8

9 Prune Always False Predicates V8 APAR PK49265 (ZPARM PREDPRUNE) Literal IN or = only (no host vars or REOPT) WHERE ('A' = 'B' OR T1.COL1 IN ('B', 'C')) Becomes. WHERE T1.COL1 IN ('B', 'C') Original OR is stage 2 Disables index access and many query transformations Documented tricks are NOT pruned (OR 0=1) 9 9

10 Index-only Preference Ever created an index to support index-only? Only to have optimizer choose index + data? SELECT C2 FROM T1 WHERE C1 =? Index 1 (C1) Index 2 (C1, C2) Index + data Index-only V8 APAR PK51734 ZPARM OPTIXOPREF Optimizer will prioritize index-only over index + data given same index prefix 10 10

11 Full index matching preference Optimizer already preferences 1 row index Full equals match on a unique index APAR PK59731 When FETCH FIRST 1 ROW ONLY is specified Will choose index with matching on all predicates WHERE C1 =? AND C2 =? AND C3 >? FETCH FIRST 1 ROW ONLY Index 1 (C1, C2, C3) Preference this over other indexes 11 11

12 Agenda V8 highlights Anything new for V8? What about DB2 9 enhancements in V8? DB2 9 highlights Any other stuff we don t tell you about? 12 12

13 Optimization Service Center DB2 for z/os Optimization Service Center (OSC) New no-charge offering Included in DB2 Accessories Suite for z/os V1.2 Available via web download DB2 9 in March 2007 DB2 V8 in April 2008 www-306.ibm.com/software/data/db2/zos/downloads/osc.html 13 13

14 VE OSC Feature comparison Functions Visual Explain Optimization Service Center Requires DB2 9? Queries from Cache, Catalog Yes Yes Query Formatter, Annotation Yes Access Plan Graph Visual Plan Hint Yes Yes Yes Query Statistics Advisor Yes Yes Workload Statistics Advisor Yes Profile based Monitoring Yes Yes 14 14

15 OSC Welcome Screen 15 15

16 What-If? Optimization Determine the optimizer impact of Creating or dropping indexes Without physically creating or dropping the index DB2 9 GA, retrofitted to V8 via APAR PK46687 When activated Will affect queries issuing EXPLAIN only Will NOT affect execution choice 16 16

17 What-If? Optimization Table DSN_VIRTUAL_INDEXES Table DSN_VIRTUAL_INDEX in V8 CM DDL is in SDSNSAMP(DSNTESC) Many columns similar to SYSINDEXES PLUS ENABLE (Y/N) to enable/disable the entry MODE (C/D) to model CREATE or DROP of the index COLNOn to list the col numbers of up to 64 index cols ORDERINGn (A/D) to list ordering of up to 64 index cols 17 17

18 What-If? Recommendation Beware of the documented recommendation: IBM s intention is that this feature will be used by tool vendors (including IBM)* 18 18

19 What-If? CREATE How would a tool test the optimizer effect? CREATE index AUSPTEST INSERT INTO DSN_VIRTUAL_INDEXES (TBCREATOR, TBNAME, IXCREATOR, IXNAME, ENABLE, MODE, UNIQUERULE, COLCOUNT, CLUSTERING, NLEAF, NLEVELS, INDEXTYPE, PGSIZE, FIRSTKEYCARDF, FULLKEYCARDF, CLUSTERRATIOF, PADDED, COLNO1, ORDERING1, COLNO2, ORDERING2, COLNO3, ORDERING3) VALUES ('SAPR3', 'AUSP', 'SAPR3', 'AUSPTEST', 'Y', 'C', 'D', 7, 'N', , 5, '2', 4, 1, , 0.95, 'N', 1, 'A', 6, 'A', 3, 'A'); Create 19 19

20 What-If? DROP How would a tool test the optimizer effect? DROP index AUSP~Z1 Populate detail from SYSIBM.SYSINDEXES INSERT INTO DSN_VIRTUAL_INDEXES (TBCREATOR, TBNAME, IXCREATOR, IXNAME, ENABLE, MODE, UNIQUERULE, COLCOUNT, CLUSTERING, NLEAF, NLEVELS, INDEXTYPE, PGSIZE, FIRSTKEYCARDF, FULLKEYCARDF, CLUSTERRATIOF, PADDED) SELECT TBCREATOR, TBNAME, CREATOR, NAME, 'Y', 'D', UNIQUERULE, COLCOUNT, CLUSTERING, NLEAF, NLEVELS, '2', 4, FIRSTKEYCARDF, FULLKEYCARDF, CLUSTERRATIOF, PADDED FROM SYSIBM.SYSINDEXES WHERE CREATOR = 'SAPR3' AND NAME = 'AUSP~Z1'; Drop 20 20

21 What If? Don t forget to.. Don t forget to DISABLE the What If? Choices Otherwise it will continue to impact all explains or UPDATE DSN_VIRTUAL_INDEXES SET ENABLE = N ; DELETE FROM DSN_VIRTUAL_INDEXES; 21 21

22 What If? Statistics Considerations Physically dropping indexes Removes statistics that can be attributed to that index Regardless if collected via the index or via COLGROUP Physically creating indexes Allows RUNSTATS to collect additional statistics What If? Optimization does not drop/create statistics 22 22

23 Agenda V8 highlights Anything new for V8? What about DB2 9 enhancements in V8? DB2 9 highlights Any other stuff we don t tell you about? 23 23

24 DB2 9 Optimizer Highlights Plan Stability Discussed in session A13 REOPT(AUTO) for dynamic SQL Discussed in session A13 Histogram Statistics Page range screening enhancements Global Optimization Generalized sparse index/in-memory WF 24 24

25 DB2 9 Optimizer Highlights Dynamic Index ANDing Index on expression Tracking index usage Optimization Service Center Sort performance and Sort avoidance Parallelism enhancements 25 25

26 DB2 9 SQL Highlights ORDER BY & FETCH FIRST in subq/table expr MERGE SELECT FROM MERGE/UPDATE/DELETE INTERSECT/EXCEPT SQL Operators OLAP Ranking functions RANK/DENSE_RANK/ROW_NUMBER 26 26

27 Dynamic Index Anding Pre-fact table filtering Filtering dimensions accessed concurrently Runtime optimization Terminate poorly filtering legs at runtime D1 More aggressive parallelism Fallback to workfile for RID pool failure Instead of r-scan D5 F D2 D4 D

28 Global Optimization V8 Limitations on subq-to-join transformations Subq costing is independent of outer table Whereas joins consider context of access DB2 9 Non-transformed subq are considered by optimizer In correlated and non-correlated forms Cross query block context considered Subqueries represented as virtual tables Thus table dependency can change 28 28

29 Generalized Sparse Index DB2 9 can create a sparse index at runtime To support join Previously only available for Star Join 29 29

30 How does Sparse Index work? Sparse index may be a subset of workfile (WF) Example, WF may have 10,000* entries Sparse index may have enough space (240K) for 1,000* entries Sparse index is binary searched to find target location of search key At most 10 WF entries are scanned NLJ Workfile sorted T 1 T 2 (WF) in t2.c order Binary Search of sparse index to look up approximate location of qualified key t1.c = t2.c Key RID Sparse Index sorted in t2.c order T 2 (WF) *Note: 1,000 & 10,000 are examples only 30 30

31 Data Caching vs Sparse Index Data Caching Also known as In-Memory WF Is a runtime enhancement to sparse index Sparse Index/In-Memory WF Extended to non-star join in DB2 9 New ZPARM MXDTCACH Maximum extent in MB, for data caching per thread If memory is insufficient Fall-back to sparse index at runtime 31 31

32 How does In-Memory WF work? Whereas sparse index may be a subset of WF IMWF contains the full result (not sparse) Example, WF may have 10,000 entries IMWF is binary searched to find target location of search key Binary Search of WF to look up exact location of qualified key T 1 NLJ t1.c = t2.c T 2 (WF) T 2 (WF) Workfile sorted in t2.c order 32 32

33 Index on Expression DB2 9 supports index on expression Can turn a stage 2 predicate into indexable SELECT * FROM CUSTOMERS WHERE YEAR(BIRTHDATE) = 1971 CREATE INDEX ADMF001.CUSTIX3 ON ADMF001.CUSTOMERS (YEAR(BIRTHDATE) ASC) Previous FF = 1/25 Now, RUNSTATS collects frequencies. Improved FF accuracy 33 33

34 Agenda V8 highlights Anything new for V8? What about DB2 9 enhancements in V8? DB2 9 highlights Any other stuff we don t tell you about? 34 34

35 Anything else we don t tell you about? Sure.. Every DB2 release has improvements to optimizer But most enhancements are too detailed for the interest of most customers, or involve the formulas which are proprietary Then, what else is interesting? 35 35

36 Predicate Localization Cross table OR predicates can be localized to each table V8 within Star Join context only DB2 9 for non-star join SELECT * FROM T1, T2 WHERE T1.C1 = T2.C1 AND ((T1.C2 = A AND T2.C3 > 5) OR (T1.C2 = A AND T2.C3 > 10)) Optimizer generates redundant BT predicates AND (T1.C2 = A ) Exact duplicates are consolidated AND (T2.C3 > 5 OR T2.C3 > 10) 36 36

37 Sort Avoidance Improvements Sort avoidance for GROUP BY Order of GROUP BY columns re-arranged to match index Data may be returned in a different order Relational theory states that order is NOT guaranteed without ORDER BY SELECT C2, C1 FROM T1 GROUP BY C2, C1 GROUP BY in C2, C1 sequence Index 1 (C1, C2) Index in C1, C2 sequence 37 37

38 Sort Improvements Reduced workfile usage for very small sorts Final sort step requiring 1 page will NOT allocate workfile More efficient sort with FETCH FIRST clause V8 and prior, Sort would continue to completion Then return only the requested n rows From V9, If the requested n rows will fit into a 32K page, As the data is scanned, Only the top n rows are kept in memory Order of the rows is tracked No requirement for final sort 38 38

39 FETCH FIRST V8 Example Sort is not avoided via index Must sort all qualified rows SELECT C1 FROM T ORDER BY C1 FETCH FIRST 3 ROWS ONLY C1 C Scan Fetch Sort row table. Who cares? But, 1 million rows?

40 Scan FETCH FIRST DB2 9 Example Sort is not avoided via index But in-memory swap avoids sort C Pointers maintain order Memory st Fetch 3 3 rd Fetch 2 2 nd Fetch SELECT C1 FROM T ORDER BY C1 FETCH FIRST 3 ROWS ONLY Suggestion: Add FETCH FIRST when subset is required

41 Parallelism Enhancements In V8 Lowest cost is BEFORE parallelism In DB2 9 Lowest cost is AFTER parallelism Only a subset of plans are considered for parallelism Optimizer Parallelism How to parallelize these plans? One Lowest cost plan survives 41 41

42 Clusterratio Enhancement New Clusterratio formula in DB2 9 Better awareness of prefetch range More accurate CR for lower cardinality indexes DB2 9 adds new statistic collected by RUNSTATS DATAREPEATFACTOR differentiates density and sequential Dense (and sequential) Sequential (not dense) Recommend RUNSTATS before mass REBIND in DB

43 Tracking Index Usage Additional indexes require overhead for Utilities REORG, RUNSTATS, LOAD etc Data maintenance INSERT, UPDATE, DELETE Disk storage Optimization time Increases optimizer s choices But identifying unused indexes is a difficult task Especially in a dynamic SQL environment 43 43

44 Tracking Index Usage RTS records the index last used date. SYSINDEXSPACESTATS.LASTUSED Updated once in a 24 hour period RTS service task updates at 1st externalization interval (set by STATSINT) after 12PM. if the index is used by DB2, update occurs. If the index was not used, no update. "Used", as defined by DB2 as: As an access path for query or fetch. For searched UPDATE / DELETE SQL statement. As a primary index for referential integrity. To support foreign key access 44 44

45 Session A08 DB2 for z/os Optimizer: What have you done for me lately? Terry Purcell IBM www-306.ibm.com/software/data/db2/zos/downloads/osc.html 45 45

Why did the DB2 for z/os optimizer choose that access path?

Why did the DB2 for z/os optimizer choose that access path? Why did the DB2 for z/os optimizer choose that access path? Terry Purcell IBM tpurcel@us.ibm.com Saghi Amirsoleymani IBM amirsole@us.ibm.com Session Code: A10 Thursday May 13 th, 9:45am 10:45am Platform:

More information

What s new in DB2 9 for z/os for Applications

What s new in DB2 9 for z/os for Applications What s new in DB2 9 for z/os for Applications Patrick Bossman bossman@us.ibm.com Senior software engineer IBM Silicon Valley Lab 9/8/2009 Disclaimer Copyright IBM Corporation [current year]. All rights

More information

More Ways to Challenge the DB2 z/os Optimizer. Terry Purcell IBM Silicon Valley Lab

More Ways to Challenge the DB2 z/os Optimizer. Terry Purcell IBM Silicon Valley Lab More Ways to Challenge the DB2 z/os Optimizer Terry Purcell IBM Silicon Valley Lab Agenda Introduction Process for validating the preferred access path Filter Factor Challenges Predicate Challenges Conclusion

More information

DB2 12 for z/os Optimizer Sneak Peek

DB2 12 for z/os Optimizer Sneak Peek DB2 12 for z/os Optimizer Sneak Peek Terry Purcell IBM Silicon Valley Lab Session Code: @Alabama Tuesday Oct 4th Platform: DB2 for z/os Disclaimer Information regarding potential future products is intended

More information

Development in a Virtualized Production Environment

Development in a Virtualized Production Environment Development in a Virtualized Production Environment True DB2 performance simulation covering Environment changes Schema changes Application changes Ulf Heinrich SEGUS, Inc u.heinrich@segus.com 2012 SOFTWARE

More information

DB2 9 for z/os Selected Query Performance Enhancements

DB2 9 for z/os Selected Query Performance Enhancements Session: C13 DB2 9 for z/os Selected Query Performance Enhancements James Guo IBM Silicon Valley Lab May 10, 2007 10:40 a.m. 11:40 a.m. Platform: DB2 for z/os 1 Table of Content Cross Query Block Optimization

More information

What s new from the Optimizer in DB2 11 for z/os?

What s new from the Optimizer in DB2 11 for z/os? What s new from the Optimizer in DB2 11 for z/os? 赵雄伟 DB2 z/os Level 2 support zhaoxw@cn.ibm.com 1 Agenda Plan Management Predicate Indexability In-Memory Data Cache (sparse index) Duplicate Removal DPSIs

More information

Do these DB2 10 for z/os Optimizer Enhancments apply to me?

Do these DB2 10 for z/os Optimizer Enhancments apply to me? Do these DB2 10 for z/os Optimizer Enhancments apply to me? Andrei Lurie IBM Silicon Valley Lab February 4, 2013 Session Number 12739 Agenda Introduction IN-list and complex ORs Predicate simplification

More information

What Developers must know about DB2 for z/os indexes

What Developers must know about DB2 for z/os indexes CRISTIAN MOLARO CRISTIAN@MOLARO.BE What Developers must know about DB2 for z/os indexes Mardi 22 novembre 2016 Tour Europlaza, Paris-La Défense What Developers must know about DB2 for z/os indexes Introduction

More information

What s New from the Optimizer in DB2 11 for z/os?

What s New from the Optimizer in DB2 11 for z/os? What s New from the Optimizer in DB2 11 for z/os? par Terry Purcell, IBM Réunion du Guide DB2 pour z/os France Mardi 18 novembre 2014 Tour Europlaza, Paris-La Défense Agenda Plan Management Predicate Indexability

More information

Db2 12 for z/os Optimizer Update

Db2 12 for z/os Optimizer Update IBM & IDUG 2018 Data Tech Summit Db2 12 for z/os Optimizer Update Terry Purcell IBM Dec 12 th, 2018 #Db2World #IDUGDb2 #IBMDb2 IBM z Analytics Agenda Db2 12 Performance Focus UNION ALL & Outer Join Enhancements

More information

DB2 10 for z/os Optimization and Query Performance Improvements

DB2 10 for z/os Optimization and Query Performance Improvements DB2 10 for z/os Optimization and Query Performance Improvements James Guo DB2 for z/os Performance IBM Silicon Valley Lab August 11, 2011 6 PM 7 PM Session Number 9524 Disclaimer Copyright IBM Corporation

More information

Control your own destiny with Optimization Hints

Control your own destiny with Optimization Hints Control your own destiny with Optimization Hints Patrick Bossman IBM Silicon Valley Lab December 13, 2006 Columbia, MD 1 Agenda Overview Reasons for using Environment setup Preparation Sample cases Verifying

More information

Query tuning with Optimization Service Center

Query tuning with Optimization Service Center Session: F08 Query tuning with Optimization Service Center Patrick Bossman IBM May 20, 2008 4:00 p.m. 5:00 p.m. Platform: DB2 for z/os 1 Agenda Overview of Optimization Service Center Workload (application)

More information

Development in a Virtualized Production Environment

Development in a Virtualized Production Environment Development in a Virtualized Production Environment True DB2 performance simulation covering Environment changes Schema changes Application changes Ulf Heinrich SEGUS, Inc u.heinrich@segus.com 2013 SOFTWARE

More information

DB2 9 for z/os V9 migration status update

DB2 9 for z/os V9 migration status update IBM Software Group DB2 9 for z/os V9 migration status update July, 2008 Bart Steegmans DB2 for z/os L2 Performance Acknowledgement and Disclaimer i Measurement data included in this presentation are obtained

More information

DB2 12 for z Optimizer

DB2 12 for z Optimizer Front cover DB2 12 for z Optimizer Terry Purcell Redpaper Introduction There has been a considerable focus on performance improvements as one of the main themes in recent IBM DB2 releases, and DB2 12

More information

Performance Topics for DB2 Application Tuners

Performance Topics for DB2 Application Tuners Platform: z/os Application Development Performance Topics for DB2 Application Tuners Sheryl M. Larsen Sheryl M. Larsen, Inc. September 10, 2008 MWDUG Chicago, IL DB2 is a Registered Trademark of IBM Corporation

More information

Db2 for z/os: Lies, Damn lies and Statistics

Db2 for z/os: Lies, Damn lies and Statistics Db2 for z/os: Lies, Damn lies and Statistics SEGUS & SOFTWARE ENGINEERING GmbH Session code: A18 05.10.2017, 11:00 Platform: Db2 for z/os 1 Agenda Quotes Quotes Basic RUNSTATS knowledge Basic RUNSTATS

More information

Query Optimization Ways of DB2 to Improve Database Performance

Query Optimization Ways of DB2 to Improve Database Performance Query Optimization Ways of DB2 to Improve Database Performance 1 School of Software Engineering, Tongji University Shanghai, 201804, P.R.China E-mail:billtangjf@tongji.edu.cn Zewen Hua a, Jinsong Feng

More information

To REORG or not to REORG That is the Question. Kevin Baker BMC Software

To REORG or not to REORG That is the Question. Kevin Baker BMC Software To REORG or not to REORG That is the Question Kevin Baker BMC Software Objectives Identify I/O performance trends for DB pagesets Correlate reorganization benefits to I/O performance trends Understand

More information

Creating indexes suited to your queries

Creating indexes suited to your queries Creating indexes suited to your queries Jacek Surma PKO Bank Polski S.A. Session Code: B11 Wed, 16th Oct 2013, 11:00 12:00 Platform: DB2 z/os Michał Białecki IBM Silicon Valley / SWG Cracow Lab In every

More information

Contents. Why You Should Read This Book by Tom Ramey... i About the Authors... v Introduction by Surekha Parekh... xv

Contents. Why You Should Read This Book by Tom Ramey... i About the Authors... v Introduction by Surekha Parekh... xv Contents Why You Should Read This Book by Tom Ramey... i About the Authors... v Introduction by Surekha Parekh... xv DB2 12 for z/os: Technical Overview and Highlights by John Campbell and Gareth Jones...

More information

Kathleen Durant PhD Northeastern University CS Indexes

Kathleen Durant PhD Northeastern University CS Indexes Kathleen Durant PhD Northeastern University CS 3200 Indexes Outline for the day Index definition Types of indexes B+ trees ISAM Hash index Choosing indexed fields Indexes in InnoDB 2 Indexes A typical

More information

DB2 Optimization Service Center DB2 Optimization Expert for z/os

DB2 Optimization Service Center DB2 Optimization Expert for z/os DB2 Optimization Service Center DB2 Optimization Expert for z/os Jay Bruce, Autonomic Optimization Mgr jmbruce@us.ibm.com Important Disclaimer THE I NFORMATI ON CONTAI NED I N THI S PRESENTATI ON I S PROVI

More information

An A-Z of System Performance for DB2 for z/os

An A-Z of System Performance for DB2 for z/os Phil Grainger, Lead Product Manager BMC Software March, 2016 An A-Z of System Performance for DB2 for z/os The Challenge Simplistically, DB2 will be doing one (and only one) of the following at any one

More information

Revival of the SQL Tuner

Revival of the SQL Tuner Revival of the SQL Tuner Sheryl Larsen BMC Session code: F16 9:20 AM Thursday, May 3, 2018 Db2 for z/os Competing More Optimize Drowning Resources, What in Pressures Data You More Have! Problems Drowning

More information

Optimising Insert Performance. John Campbell Distinguished Engineer IBM DB2 for z/os Development

Optimising Insert Performance. John Campbell Distinguished Engineer IBM DB2 for z/os Development DB2 for z/os Optimising Insert Performance John Campbell Distinguished Engineer IBM DB2 for z/os Development Objectives Understand typical performance bottlenecks How to design and optimise for high performance

More information

7. Query Processing and Optimization

7. Query Processing and Optimization 7. Query Processing and Optimization Processing a Query 103 Indexing for Performance Simple (individual) index B + -tree index Matching index scan vs nonmatching index scan Unique index one entry and one

More information

Db2ZAI Machine Learning in Db2 for z/os

Db2ZAI Machine Learning in Db2 for z/os Db2ZAI Machine Learning in Terry Purcell, IBM Dec 10th, 2018 IBM z Analytics What is Machine Learning? A twist on traditional data processing Put another way, it s about computers that learn without being

More information

DB2 SQL Tuning Tips for z/os Developers

DB2 SQL Tuning Tips for z/os Developers DB2 SQL Tuning Tips for z/os Developers Tony Andrews IBM Press, Pearson pic Upper Saddle River, NJ Boston Indianapolis San Francisco New York Toronto Montreal London Munich Paris Madrid Cape Town Sydney

More information

Querying Data with Transact SQL

Querying Data with Transact SQL Course 20761A: Querying Data with Transact SQL Course details Course Outline Module 1: Introduction to Microsoft SQL Server 2016 This module introduces SQL Server, the versions of SQL Server, including

More information

An Index's Guide to the Universe

An Index's Guide to the Universe An Index's Guide to the Universe Brad Price Werner Enterprises Session Code: D12 Thu, May 02, 2013 (03:30 PM -04:30 PM) Platform: DB2 LUW An Index's Guide to the Universe Brad Price Werner Enterprises

More information

DATABASE PERFORMANCE AND INDEXES. CS121: Relational Databases Fall 2017 Lecture 11

DATABASE PERFORMANCE AND INDEXES. CS121: Relational Databases Fall 2017 Lecture 11 DATABASE PERFORMANCE AND INDEXES CS121: Relational Databases Fall 2017 Lecture 11 Database Performance 2 Many situations where query performance needs to be improved e.g. as data size grows, query performance

More information

Total environment simulation. Workload Replay in an agile world

Total environment simulation. Workload Replay in an agile world Total environment simulation Workload Replay in an agile world Ulf Heinrich SEGUS Inc 2018 SOFTWARE ENGINEERING GMBH and SEGUS Inc. 1 Agenda Testing, virtualizing and simulating the aspects of reliable

More information

Vendor: IBM. Exam Code: Exam Name: IBM Certified Database Administrator - DB2 10 for z/os. Version: Demo

Vendor: IBM. Exam Code: Exam Name: IBM Certified Database Administrator - DB2 10 for z/os. Version: Demo Vendor: IBM Exam Code: 000-612 Exam Name: IBM Certified Database Administrator - DB2 10 for z/os Version: Demo QUESTION NO: 1 Workload Manager (WLM) manages how many concurrent stored procedures can run

More information

Advanced Oracle SQL Tuning v3.0 by Tanel Poder

Advanced Oracle SQL Tuning v3.0 by Tanel Poder Advanced Oracle SQL Tuning v3.0 by Tanel Poder /seminar Training overview This training session is entirely about making Oracle SQL execution run faster and more efficiently, understanding the root causes

More information

Multidimensional Clustering (MDC) Tables in DB2 LUW. DB2Night Show. January 14, 2011

Multidimensional Clustering (MDC) Tables in DB2 LUW. DB2Night Show. January 14, 2011 Multidimensional Clustering (MDC) Tables in DB2 LUW DB2Night Show January 14, 2011 Pat Bates, IBM Technical Sales Professional, Data Warehousing Paul Zikopoulos, Director, IBM Information Management Client

More information

DB2 for z/os and OS/390 Performance Update - Part 1

DB2 for z/os and OS/390 Performance Update - Part 1 DB2 for z/os and OS/390 Performance Update - Part 1 Akira Shibamiya Orlando, Florida October 1-5, 2001 M15a IBM Corporation 1 2001 NOTES Abstract: The highlight of major performance enhancements in V7

More information

DB2 for LUW Advanced Statistics with Statistical Views. John Hornibrook Manager DB2 for LUW Query Optimization Development

DB2 for LUW Advanced Statistics with Statistical Views. John Hornibrook Manager DB2 for LUW Query Optimization Development DB2 for LUW Advanced Statistics with Statistical Views John Hornibrook Manager DB2 for LUW Query Optimization Development 1 Session Information Presentation Category: DB2 for LUW 2 DB2 for LUW Advanced

More information

Session: G03 No Magic to Improve DB2 for z/os Application Performance. Marcel Lévy Natixis. May 19, :30 p.m. 02:30 p.m. Platform: DB2 for z/os

Session: G03 No Magic to Improve DB2 for z/os Application Performance. Marcel Lévy Natixis. May 19, :30 p.m. 02:30 p.m. Platform: DB2 for z/os Session: G03 No Magic to Improve DB2 for z/os Application Performance Marcel Lévy Natixis May 19, 2008 01:30 p.m. 02:30 p.m. Platform: DB2 for z/os 1 Agenda Story of a DB2 application migration Measurement

More information

To include or not include? That is the question.

To include or not include? That is the question. To include or not include? That is the question. Donna Di Carlo BMC Software Session Code: F12 Wednesday, 16 October 2013 14:45 Platform: DB2 for z/os 2 Agenda Provide an overview of index include columns

More information

File Structures and Indexing

File Structures and Indexing File Structures and Indexing CPS352: Database Systems Simon Miner Gordon College Last Revised: 10/11/12 Agenda Check-in Database File Structures Indexing Database Design Tips Check-in Database File Structures

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe CHAPTER 19 Query Optimization Introduction Query optimization Conducted by a query optimizer in a DBMS Goal: select best available strategy for executing query Based on information available Most RDBMSs

More information

Datenbanksysteme II: Caching and File Structures. Ulf Leser

Datenbanksysteme II: Caching and File Structures. Ulf Leser Datenbanksysteme II: Caching and File Structures Ulf Leser Content of this Lecture Caching Overview Accessing data Cache replacement strategies Prefetching File structure Index Files Ulf Leser: Implementation

More information

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

IBM DB2 LUW Performance Tuning and Monitoring for Single and Multiple Partition DBs IBM DB2 LUW Performance Tuning and Monitoring for Single and Multiple Partition DBs Day(s): 5 Course Code: CL442G Overview Learn how to tune for optimum the IBM DB2 9 for Linux, UNIX, and Windows relational

More information

Course Outline. SQL Server Performance & Tuning For Developers. Course Description: Pre-requisites: Course Content: Performance & Tuning.

Course Outline. SQL Server Performance & Tuning For Developers. Course Description: Pre-requisites: Course Content: Performance & Tuning. SQL Server Performance & Tuning For Developers Course Description: The objective of this course is to provide senior database analysts and developers with a good understanding of SQL Server Architecture

More information

Short Summary of DB2 V4 Through V6 Changes

Short Summary of DB2 V4 Through V6 Changes IN THIS CHAPTER DB2 Version 6 Features DB2 Version 5 Features DB2 Version 4 Features Short Summary of DB2 V4 Through V6 Changes This appendix provides short checklists of features for the most recent versions

More information

V9 Migration KBC. Ronny Vandegehuchte

V9 Migration KBC. Ronny Vandegehuchte V9 Migration Experiences @ KBC Ronny Vandegehuchte KBC Configuration 50 subsystems (15 in production) Datasharing (3 way) 24X7 sandbox, development, acceptance, production Timings Environment DB2 V9 CM

More information

Evaluation of Relational Operations: Other Techniques. Chapter 14 Sayyed Nezhadi

Evaluation of Relational Operations: Other Techniques. Chapter 14 Sayyed Nezhadi Evaluation of Relational Operations: Other Techniques Chapter 14 Sayyed Nezhadi Schema for Examples Sailors (sid: integer, sname: string, rating: integer, age: real) Reserves (sid: integer, bid: integer,

More information

Fundamentals of DB2 Query Optimization

Fundamentals of DB2 Query Optimization Session: Fundamentals of DB2 Query Optimization Michelle Guo IBM, Silicon Valley Lab May 08, 2007 09:20 a.m. 10:20 a.m. Platform: Through this 1-hr session, we will walk through the

More information

IBM Optim Query Workload Tuner for DB2 for z/os 4.1. Hands-on Labs

IBM Optim Query Workload Tuner for DB2 for z/os 4.1. Hands-on Labs IBM Optim Query Workload Tuner for DB2 for z/os 4.1 Hands-on Labs INTRODUCTION... 2 SINGLE QUERY TUNING... 5 LAB 1 CUT COST AND OPTIMIZE PERFORMANCE... 7 1.1 GETTING STARTED... 8 1.2 CREATING A SAMPLE

More information

Relational Model History. COSC 416 NoSQL Databases. Relational Model (Review) Relation Example. Relational Model Definitions. Relational Integrity

Relational Model History. COSC 416 NoSQL Databases. Relational Model (Review) Relation Example. Relational Model Definitions. Relational Integrity COSC 416 NoSQL Databases Relational Model (Review) Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Relational Model History The relational model was proposed by E. F. Codd

More information

DB2 11 and Beyond Celebrating 30 Years of Superior Technology

DB2 11 and Beyond Celebrating 30 Years of Superior Technology #IDUG DB2 11 and Beyond Celebrating 30 Years of Superior Technology Maryela Weihrauch, Distinguished Engineer, DB2 for z/os weihrau@us.ibm.com Session 1 March 2014, DB2 for z/os Track Disclaimer Information

More information

DB2 11 for z/os Overview DUGI Massimiliano Castellini DB2 Advisor

DB2 11 for z/os Overview DUGI Massimiliano Castellini DB2 Advisor DB2 11 for z/os Overview DUGI 2014 Massimiliano Castellini DB2 Advisor 50th Anniversary of the Mainframe 7 April 1964-2014 DB2 for z/os Customer Trends Proliferation of mobile and other network-connected

More information

Practical MySQL indexing guidelines

Practical MySQL indexing guidelines Practical MySQL indexing guidelines Percona Live October 24th-25th, 2011 London, UK Stéphane Combaudon stephane.combaudon@dailymotion.com Agenda Introduction Bad indexes & performance drops Guidelines

More information

That is my advertised agenda, but I might skip about a bit The idea is to share observations gleaned from experience of using systems that have been

That is my advertised agenda, but I might skip about a bit The idea is to share observations gleaned from experience of using systems that have been 1 2 3 That is my advertised agenda, but I might skip about a bit The idea is to share observations gleaned from experience of using systems that have been upgraded to V11.1 It is not going to present any

More information

CA Chorus for DB2 Database Management

CA Chorus for DB2 Database Management CA Chorus for DB2 Database Management CA Performance Handbook for DB2 for z/os Version 04.0.00 This Documentation, which includes embedded help systems and electronically distributed materials (hereinafter

More information

DB2 V8 Neat Enhancements that can Help You. Phil Gunning September 25, 2008

DB2 V8 Neat Enhancements that can Help You. Phil Gunning September 25, 2008 DB2 V8 Neat Enhancements that can Help You Phil Gunning September 25, 2008 DB2 V8 Not NEW! General Availability March 2004 DB2 V9.1 for z/os announced March 2007 Next release in the works and well along

More information

PBR RPN - Removing Partitioning restrictions in Db2 12 for z/os

PBR RPN - Removing Partitioning restrictions in Db2 12 for z/os PBR RPN - Removing Partitioning restrictions in Db2 12 for z/os Steve Thomas CA Technologies 07/11/2017 Session ID Agenda Current Limitations in Db2 for z/os Partitioning Evolution of partitioned tablespaces

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Course 20761A: Querying Data with Transact-SQL Page 1 of 5 Querying Data with Transact-SQL Course 20761A: 2 days; Instructor-Led Introduction The main purpose of this 2 day instructor led course is to

More information

Performance Optimization for Informatica Data Services ( Hotfix 3)

Performance Optimization for Informatica Data Services ( Hotfix 3) Performance Optimization for Informatica Data Services (9.5.0-9.6.1 Hotfix 3) 1993-2015 Informatica Corporation. No part of this document may be reproduced or transmitted in any form, by any means (electronic,

More information

IBM DB2 10 for z/os beta. Reduce costs with improved performance

IBM DB2 10 for z/os beta. Reduce costs with improved performance IBM DB2 10 for z/os beta Reduce costs with improved performance TABLE OF CONTENTS SECTION I INTRODUCTION OF DB2 10 FOR Z/OS... 3 Executive Summary... 3 SECTION II PERFORMANCE AVAILABILITY... 5 Many performance

More information

DB2 12 A new spin on a successful database

DB2 12 A new spin on a successful database Presenter: Dan Lohmeier Lead Developer BMC Software Author: Phil Grainger Product Manager BMC Software DB2 12 A new spin on a successful database So, what s new with DB2 12 We ll take a speedy journey

More information

DB2 10 for z/os Technical Overview

DB2 10 for z/os Technical Overview DB2 10 for z/os Technical Overview John Campbell Distinguished Engineer DB2 for z/os Development IBM Silicon Valley Lab Email: CampbelJ@uk.ibm.com 2010 IBM Corporation DB2 10 for z/os IBM Software Group

More information

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: 20762C Developing SQL 2016 Databases Module 1: An Introduction to Database Development Introduction to the

More information

Chapter 12: Indexing and Hashing. Basic Concepts

Chapter 12: Indexing and Hashing. Basic Concepts Chapter 12: Indexing and Hashing! Basic Concepts! Ordered Indices! B+-Tree Index Files! B-Tree Index Files! Static Hashing! Dynamic Hashing! Comparison of Ordered Indexing and Hashing! Index Definition

More information

Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761)

Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761) Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761) Course Length: 3 days Course Delivery: Traditional Classroom Online Live MOC on Demand Course Overview The main purpose of this

More information

Systems Infrastructure for Data Science. Web Science Group Uni Freiburg WS 2014/15

Systems Infrastructure for Data Science. Web Science Group Uni Freiburg WS 2014/15 Systems Infrastructure for Data Science Web Science Group Uni Freiburg WS 2014/15 Lecture II: Indexing Part I of this course Indexing 3 Database File Organization and Indexing Remember: Database tables

More information

DB2 UDB: App Programming - Advanced

DB2 UDB: App Programming - Advanced A Access Methods... 8:6 Access Path Selection... 8:6 Access Paths... 5:22 ACQUIRE(ALLOCATE) / RELEASE(DEALLOCATE)... 5:14 ACQUIRE(USE) / RELEASE(DEALLOCATE)... 5:14 Active Log... 9:3 Active Logs - Determining

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Querying Data with Transact-SQL Course: 20761 Course Details Audience(s): IT Professional(s) Technology: Microsoft SQL Server 2016 Duration: 24 HRs. ABOUT THIS COURSE This course is designed to introduce

More information

Chapter 12: Indexing and Hashing

Chapter 12: Indexing and Hashing Chapter 12: Indexing and Hashing Basic Concepts Ordered Indices B+-Tree Index Files B-Tree Index Files Static Hashing Dynamic Hashing Comparison of Ordered Indexing and Hashing Index Definition in SQL

More information

Querying Microsoft SQL Server 2014

Querying Microsoft SQL Server 2014 Querying Microsoft SQL Server 2014 Course: 20461 Course Details Audience(s): IT Professional(s) Technology: Microsoft SQL Server 2014 Duration: 40 Hours ABOUT THIS COURSE This forty hours of instructor-led

More information

Chapter 8: Working With Databases & Tables

Chapter 8: Working With Databases & Tables Chapter 8: Working With Databases & Tables o Working with Databases & Tables DDL Component of SQL Databases CREATE DATABASE class; o Represented as directories in MySQL s data storage area o Can t have

More information

Optimizing Insert Performance - Part 1

Optimizing Insert Performance - Part 1 Optimizing Insert Performance - Part 1 John Campbell Distinguished Engineer DB2 for z/os development CAMPBELJ@uk.ibm.com 2 Disclaimer/Trademarks The information contained in this document has not been

More information

Query Processing: The Basics. External Sorting

Query Processing: The Basics. External Sorting Query Processing: The Basics Chapter 10 1 External Sorting Sorting is used in implementing many relational operations Problem: Relations are typically large, do not fit in main memory So cannot use traditional

More information

Something to think about. Problems. Purpose. Vocabulary. Query Evaluation Techniques for large DB. Part 1. Fact:

Something to think about. Problems. Purpose. Vocabulary. Query Evaluation Techniques for large DB. Part 1. Fact: Query Evaluation Techniques for large DB Part 1 Fact: While data base management systems are standard tools in business data processing they are slowly being introduced to all the other emerging data base

More information

[AVNICF-MCSASQL2012]: NICF - Microsoft Certified Solutions Associate (MCSA): SQL Server 2012

[AVNICF-MCSASQL2012]: NICF - Microsoft Certified Solutions Associate (MCSA): SQL Server 2012 [AVNICF-MCSASQL2012]: NICF - Microsoft Certified Solutions Associate (MCSA): SQL Server 2012 Length Delivery Method : 5 Days : Instructor-led (Classroom) Course Overview Participants will learn technical

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2015 Quiz I

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Database Systems: Fall 2015 Quiz I Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.830 Database Systems: Fall 2015 Quiz I There are 12 questions and 13 pages in this quiz booklet. To receive

More information

Carefree Migration. Setting up a DB2 Precheck Environment

Carefree Migration. Setting up a DB2 Precheck Environment Carefree Migration Setting up a DB2 Precheck Environment Ulf Heinrich SEGUS, Inc u.heinrich@segus.com 1 Agenda Death of plans, have no fear What will happen to plans during the migration How the DB2 automatic

More information

Data Modeling and Databases Ch 10: Query Processing - Algorithms. Gustavo Alonso Systems Group Department of Computer Science ETH Zürich

Data Modeling and Databases Ch 10: Query Processing - Algorithms. Gustavo Alonso Systems Group Department of Computer Science ETH Zürich Data Modeling and Databases Ch 10: Query Processing - Algorithms Gustavo Alonso Systems Group Department of Computer Science ETH Zürich Transactions (Locking, Logging) Metadata Mgmt (Schema, Stats) Application

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 6 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

Query Processing & Optimization

Query Processing & Optimization Query Processing & Optimization 1 Roadmap of This Lecture Overview of query processing Measures of Query Cost Selection Operation Sorting Join Operation Other Operations Evaluation of Expressions Introduction

More information

Query Optimization, part 2: query plans in practice

Query Optimization, part 2: query plans in practice Query Optimization, part 2: query plans in practice CS634 Lecture 13 Slides by E. O Neil based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke Working with the Oracle query optimizer First

More information

Data Modeling and Databases Ch 9: Query Processing - Algorithms. Gustavo Alonso Systems Group Department of Computer Science ETH Zürich

Data Modeling and Databases Ch 9: Query Processing - Algorithms. Gustavo Alonso Systems Group Department of Computer Science ETH Zürich Data Modeling and Databases Ch 9: Query Processing - Algorithms Gustavo Alonso Systems Group Department of Computer Science ETH Zürich Transactions (Locking, Logging) Metadata Mgmt (Schema, Stats) Application

More information

Review -Chapter 4. Review -Chapter 5

Review -Chapter 4. Review -Chapter 5 Review -Chapter 4 Entity relationship (ER) model Steps for building a formal ERD Uses ER diagrams to represent conceptual database as viewed by the end user Three main components Entities Relationships

More information

Advanced Database Systems

Advanced Database Systems Lecture IV Query Processing Kyumars Sheykh Esmaili Basic Steps in Query Processing 2 Query Optimization Many equivalent execution plans Choosing the best one Based on Heuristics, Cost Will be discussed

More information

DB2 UDB: Application Programming

DB2 UDB: Application Programming A ABS or ABSVAL... 4:19 Access Path - Determining... 10:8 Access Strategies... 9:3 Additional Facts About Data Types... 5:18 Aliases... 1:13 ALL, ANY, SOME Operator... 3:21 AND... 3:12 Arithmetic Expressions...

More information

Announcement. Reading Material. Overview of Query Evaluation. Overview of Query Evaluation. Overview of Query Evaluation 9/26/17

Announcement. Reading Material. Overview of Query Evaluation. Overview of Query Evaluation. Overview of Query Evaluation 9/26/17 Announcement CompSci 516 Database Systems Lecture 10 Query Evaluation and Join Algorithms Project proposal pdf due on sakai by 5 pm, tomorrow, Thursday 09/27 One per group by any member Instructor: Sudeepa

More information

Attack of the DB2 for z/os Clones Clone Tables That Is!

Attack of the DB2 for z/os Clones Clone Tables That Is! Attack of the DB2 for z/os Clones Clone Tables That Is! John Lyle DB2 for z/os Development Silicon Valley Laboratory, San Jose, CA New England DB2 Users Group Agenda Rationale and description DDL statements

More information

V8 SQL and Optimization Susan Lawson, YLA Session G5

V8 SQL and Optimization Susan Lawson, YLA Session G5 V8 SQL and Optimization Susan Lawson, YLA Session G5 1 YL&A 2005 1 Yevich, Lawson & Assoc. Inc. 2743 S. Veterans Pkwy PMB 226 Springfield, IL 62704 info@ylassoc.com WEB: www.ylassoc.com IBM is a registered

More information

GSE Belux DB2. Thursday 6 December DB2 V10 upgrade BNP Paribas Fortis

GSE Belux DB2. Thursday 6 December DB2 V10 upgrade BNP Paribas Fortis GSE Belux DB2 Thursday 6 December 2012 DB2 V10 upgrade experience @ BNP Paribas Fortis Agenda Configuration Business Case Install Setup Preparation Move to CM Move to NFM System monitoring 2 Configuration

More information

MIS NETWORK ADMINISTRATOR PROGRAM

MIS NETWORK ADMINISTRATOR PROGRAM NH107-7475 SQL: Querying and Administering SQL Server 2012-2014 136 Total Hours 97 Theory Hours 39 Lab Hours COURSE TITLE: SQL: Querying and Administering SQL Server 2012-2014 PREREQUISITE: Before attending

More information

Pass IBM C Exam

Pass IBM C Exam Pass IBM C2090-612 Exam Number: C2090-612 Passing Score: 800 Time Limit: 120 min File Version: 37.4 http://www.gratisexam.com/ Exam Code: C2090-612 Exam Name: DB2 10 DBA for z/os Certkey QUESTION 1 Workload

More information

MTA Database Administrator Fundamentals Course

MTA Database Administrator Fundamentals Course MTA Database Administrator Fundamentals Course Session 1 Section A: Database Tables Tables Representing Data with Tables SQL Server Management Studio Section B: Database Relationships Flat File Databases

More information

Overview of Implementing Relational Operators and Query Evaluation

Overview of Implementing Relational Operators and Query Evaluation Overview of Implementing Relational Operators and Query Evaluation Chapter 12 Motivation: Evaluating Queries The same query can be evaluated in different ways. The evaluation strategy (plan) can make orders

More information

DB2 SQL Class Outline

DB2 SQL Class Outline DB2 SQL Class Outline The Basics of SQL Introduction Finding Your Current Schema Setting Your Default SCHEMA SELECT * (All Columns) in a Table SELECT Specific Columns in a Table Commas in the Front or

More information

Foreword Preface Db2 Family And Db2 For Z/Os Environment Product Overview DB2 and the On-Demand Business DB2 Universal Database DB2 Middleware and

Foreword Preface Db2 Family And Db2 For Z/Os Environment Product Overview DB2 and the On-Demand Business DB2 Universal Database DB2 Middleware and Foreword Preface Db2 Family And Db2 For Z/Os Environment Product Overview DB2 and the On-Demand Business DB2 Universal Database DB2 Middleware and Connectivity DB2 Application Development DB2 Administration

More information

COMP 430 Intro. to Database Systems. Indexing

COMP 430 Intro. to Database Systems. Indexing COMP 430 Intro. to Database Systems Indexing How does DB find records quickly? Various forms of indexing An index is automatically created for primary key. SQL gives us some control, so we should understand

More information

Presentation Abstract

Presentation Abstract Presentation Abstract From the beginning of DB2, application performance has always been a key concern. There will always be more developers than DBAs, and even as hardware cost go down, people costs have

More information