IBM Software Group ® Recommending Materialized Views and Indexes with the IBM DB2 Design Advisor (Automating Physical Database Design) Jarek Gryz.

Slides:



Advertisements
Similar presentations
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Advertisements

On-line Index Selection for Physical Database Tuning
Database Optimization & Maintenance Tim Richard ECM Training Conference#dbwestECM Agenda SQL Configuration OnBase DB Planning Backups Integrity.
Outline SQL Server Optimizer  Enumeration architecture  Search space: flexibility/extensibility  Cost and statistics Automatic Physical Tuning  Database.
--What is a Database--1 What is a database What is a Database.
Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture.
Chapter Physical Database Design Methodology Software & Hardware Mapping Logical Design to DBMS Physical Implementation Security Implementation Monitoring.
Chapter 6: Database Evolution Title: AutoAdmin “What-if” Index Analysis Utility Authors: Surajit Chaudhuri, Vivek Narasayya ACM SIGMOD 1998.
Physical Database Monitoring and Tuning the Operational System.
Chapter 3: Data Storage and Access Methods
DB2 Universal Database February 27, 2003 | BTW 2003 © 2003 IBM Corporation Automatic Database Configuration for DB2 Universal Database Compressing Years.
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
Chapter 17 Methodology – Physical Database Design for Relational Databases Transparencies © Pearson Education Limited 1995, 2005.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Team Dosen UMN Physical DB Design Connolly Book Chapter 18.
Backup & Recovery 1.
Database System Development Lifecycle © Pearson Education Limited 1995, 2005.
Overview of the Database Development Process
Modularizing B+-trees: Three-Level B+-trees Work Fine Shigero Sasaki* and Takuya Araki NEC Corporation * currently with 1st Nexpire Inc.
Practical Database Design and Tuning. Outline  Practical Database Design and Tuning Physical Database Design in Relational Databases An Overview of Database.
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 9 Index Management.
Online Database Support Experiences Diana Bonham, Dennis Box, Anil Kumar, Julie Trumbo, Nelly Stanfield.
STORING ORGANIZATIONAL INFORMATION— DATABASES CIS 429—Chapter 7.
Lecture 9 Methodology – Physical Database Design for Relational Databases.
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
Informix IDS Administration with the New Server Studio 4.0 By Lester Knutsen My experience with the beta of Server Studio and the new Informix database.
Chapter 16 Methodology – Physical Database Design for Relational Databases.
Oracle9i Performance Tuning Chapter 1 Performance Tuning Overview.
Module 5 Planning for SQL Server® 2008 R2 Indexing.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
© Pearson Education Limited, Chapter 13 Physical Database Design – Step 4 (Choose File Organizations and Indexes) Transparencies.
10/10/2012ISC239 Isabelle Bichindaritz1 Physical Database Design.
Physical Database Design Transparencies. ©Pearson Education 2009 Chapter 11 - Objectives Purpose of physical database design. How to map the logical database.
By Shanna Epstein IS 257 September 16, Cnet.com Provides information, tools, and advice to help customers decide what to buy and how to get the.
Indexes / Session 2/ 1 of 36 Session 2 Module 3: Types of Indexes Module 4: Maintaining Indexes.
Week 7 : Chapter 7 Agenda SQL 710 Maintenance Plan:
Methodology – Physical Database Design for Relational Databases.
SQL/Lesson 7/Slide 1 of 32 Implementing Indexes Objectives In this lesson, you will learn to: * Create a clustered index * Create a nonclustered index.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
7 Strategies for Extracting, Transforming, and Loading.
The Self-managing Database: Proactive Space and Schema Object Management Amit Ganesh Director, Data, Space and Transaction Processing Oracle Corporation.
Chapter 4 Indexes. Indexes Logically represents subsets of data from one or more tables View Generates numeric valuesSequence Basic unit of storage; composed.
Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata Performance Optimization.
Creating Indexes on Tables An index provides quick access to data in a table, based on the values in specified columns. A table can have more than one.
IMS 4212: Database Implementation 1 Dr. Lawrence West, Management Dept., University of Central Florida Physical Database Implementation—Topics.
Maintenance Practices. Goal  Automate the necessary DBA chores to put organizations on the path of having healthier, consistent and more trustworthy.
Lecture 15: Query Optimization. Very Big Picture Usually, there are many possible query execution plans. The optimizer is trying to chose a good one.
T EST T OOLS U NIT VI This unit contains the overview of the test tools. Also prerequisites for applying these tools, tools selection and implementation.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
Copyright Sammamish Software Services All rights reserved. 1 Prog 140  SQL Server Performance Monitoring and Tuning.
SQL Server Statistics DEMO SQL Server Statistics SREENI JULAKANTI,MCTS.MCITP,MCP. SQL SERVER Database Administration.
DB Index Expert Copyright © SoftTree Technologies, Inc.
SQL Basics Review Reviewing what we’ve learned so far…….
IT 5433 LM4 Physical Design. Learning Objectives: Describe the physical database design process Explain how attributes transpose from the logical to physical.
9 Copyright © 2006, Oracle. All rights reserved. Summary Management.
Databases and DBMSs Todd S. Bacastow January 2005.
SQL Server Statistics and its relationship with Query Optimizer
Practical Database Design and Tuning
Data, Space and Transaction Processing
Record Storage, File Organization, and Indexes
Designing Database Solutions for SQL Server
Methodology – Physical Database Design for Relational Databases
Data, Databases, and DBMSs
國立臺北科技大學 課程:資料庫系統 fall Chapter 18
Practical Database Design and Tuning
Recommending Materialized Views and Indexes with the IBM DB2 Design Advisor (Automating Physical Database Design) Jarek Gryz.
Views 1.
Presentation transcript:

IBM Software Group ® Recommending Materialized Views and Indexes with the IBM DB2 Design Advisor (Automating Physical Database Design) Jarek Gryz

IBM Software Group | DB2 Information Management Software Agenda  Motivation  Indexes in DB2  Materialized query tables in DB2  Problem definition  How does the DB2 Design Advisor tool work ?  Experiments

IBM Software Group | DB2 Information Management Software Motivation

IBM Software Group | DB2 Information Management Software Why have an index?  Performance, Performance, Performance  Provides order  for example : Joins, GROUP BY, ORDER BY, DISTINCT  Limits I/O and data retrieved due to filtering with predicates  Range of values (start/stop keys)  Join predicates  Provides index-only access  Enforces uniqueness or other constraints  Provides statistics useful to the optimizer for cardinality estimation  for example: statistics on number of keys

IBM Software Group | DB2 Information Management Software Why have Materialized query tables ?  The MQT feature is a powerful feature in DB2 that allows you to precompute and materialize a query result into a table  Full refresh or incremental refresh possible  Subsequently it allows similar queries to automatically use the precomputed data from the MQT to improve performance

IBM Software Group | DB2 Information Management Software Problem Definition  Given:  Workload information  System configuration  Database characteristics  Determine:  An Index and MQT set that will lead to good workload performance in a reasonable or specified maximum time considering disk space and maintenance constraints and be easy to use

IBM Software Group | DB2 Information Management Software The DB2 Design Advisor  Automatically capture :  A representative query workload (potentially compressing it to reduce its size)  The existing database characteristics and environment  System information  Determines:  An Index and MQT set that will lead to good ESTIMATED workload response time Using DB2's Query Rewriter/Optimizer to suggest candidates Using DB2's Optimizer to provide cost / benefit information Using a combinatorial algorithm to perform a cost-benefit analysis observing constraints of (1) advisor execution time, (2) disk space and (3) anticipated DB2 costs of creating the entities plus overhead during INSERT / UPDATE / DELETE activity. Using sampled or estimated statistics of new entities Providing both GUI and command line options for initiating

IBM Software Group | DB2 Information Management Software Issues in automating physical DB design selection  When to initiate the design algorithm?  Health monitor with health indicators such as number of sort overflows to initiate the advisor  What data to use to make the decision?  Automatically capture workload, DB, and system information  Allow work on real data or just statistics  How to make the decision?  Method to be described  How are the recommendations implemented?  Little user interaction to ask if or when to initiate to gain DBA trust  Online methods to reduce implementation cost E.g., online index creation

IBM Software Group | DB2 Information Management Software The various steps within the Advisor

IBM Software Group | DB2 Information Management Software Index candidate generation  During optimization generate virtual candidates when:  Predicate exists but no index (e.g., R.A > 5 or R.A=S.B)  Ordering required  Uniqueness required  Winning candidates are the virtuals in the final optimized query plan  Provides candidates we know the optimizer will use

IBM Software Group | DB2 Information Management Software MQT Candidate Generation  Candidates are generated from original queries, logical views and common expressions which are formed by matching multiple queries.  Uses multiquery optimization (MQO)  Provides candidates we know the queries will use  Candidates can contain table references in a federated DB (tables on different servers)

IBM Software Group | DB2 Information Management Software Combinatorial search algorithm  The search phase uses a knapsack algorithm and random swap method to choose the recommended index and MQT set  Requires each candidate to have a cost-benefit ratio (cbratio)  Benefit based on estimated cost with and without MQT usage (updates have negative benefit)  Cost based on disk space usage  REFRESH DEFERRED or IMMEDIATE MQTs recommended.  Assumption (DEFERRED): estimated time for population = full refresh cost one refresh cost included in the calculation  IMMEDIATE changes added in plans for insert/update/deletes  If indexes on candidate MQT are selected, then the MQT must be selected as well

IBM Software Group | DB2 Information Management Software Experiments  Detect what MQO candidates adds to performance improvement  OLAP DB and workload  Workload estimated execution time (WET) Type of MQT SelectionWET without MQTsWET with MQTs% diff in WETsNum. of MQTs MQTs from queries seconds353.0 seconds28.5%7 MQTs from MQO seconds352.0 seconds28.4%4

IBM Software Group | DB2 Information Management Software MOLAP Experiments  16 dimensions and 8 measures  Use Medium and no workload compression  Demonstrates advisor scalability  Less queries means faster advisor

IBM Software Group | DB2 Information Management Software Self-optimizing Self- configuring Self-healing Autonomic capabilities in DB2 Stinger Configuration Advisor Design Advisor Health Monitor Recommendation Advisor Automatic page write integrity checking Automatic index reorganization Recovery Expert Fault Monitor Backup Self-tuning Automated HADR DB2/Websphere Integration log and trace analyzer Query compiler query rewrite cost based optimization Automatic query parallelism degree Self-configuring/optimizing utilities Adaptive utility throttling Runstats Performance Expert Query patroller workload manager Self-tuning load advises: Indexes, MDCs, MQTs, Partitioning Automated Table Maintenance Runstats Reorg Statistics profiling

IBM Software Group | DB2 Information Management Software

BACKUP SLIDES

IBM Software Group | DB2 Information Management Software Example Internal Rewrite using an MQT

IBM Software Group | DB2 Information Management Software Setting up objects for creation  List and modify recommended indexes and MQTs  Shows workload performance improvement  Shows storage requirements for all indexes and MQTs

IBM Software Group | DB2 Information Management Software Reviewing Unused Objects  This page is given to supply users information on what existing MQTs and indexes are not chosen by the query plans  Two Reasons:  They were not useful before our recommendations  Their use was overridden by the recommended objects

IBM Software Group | DB2 Information Management Software Scheduling the Creation Task  Allows users to perform object creation at any time they prefer  Allow some user intervention to build DBA trust