Tuning a Very Large Data Warehouse Pichai Bala. About Me Working in the IT industry for the past 17 years Working in Oracle since 1993. Working in Data.

Slides:



Advertisements
Similar presentations
Advanced Oracle DB tuning Performance can be defined in very different ways (OLTP versus DSS) Specific goals and targets must be set => clear recognition.
Advertisements

Database Tuning. Objectives Describe the roles associated with database tuning. Describe the dependency between tuning in different development phases.
Office of the Accountant General (A&E) Andhra Pradesh Hyderabad
Chapter 9. Performance Management Enterprise wide endeavor Research and ascertain all performance problems – not just DBMS Five factors influence DB performance.
13 Copyright © 2005, Oracle. All rights reserved. Monitoring and Improving Performance.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Overview of performance tuning strategies Oracle Performance Tuning Allan Young June 2008.
© Bharati Vidyapeeths Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeths Institute of Computer Applications and.
Chris Ruel * Image used without permission.
Go-Faster Consultancy Ltd.1 Experiences of Global Temporary Tables in Oracle 8.1 David Kurtz Go-Faster Consultancy Ltd.
Introduction to Oracle
<Insert Picture Here>
Oracle Architecture. Instances and Databases (1/2)
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2007 all rights.
DataBase Administration Scheduling jobs Backing up and restoring Performing basic defragmentation and index rebuilding Using alerts Archiving.
Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because.
1 - Oracle Server Architecture Overview
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Oracle 10g Database Administrator: Implementation and Administration Chapter 14 Proactive Maintenance.
10 Copyright © 2009, Oracle. All rights reserved. Managing Undo Data.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
2 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Overview.
IT The Relational DBMS Section 06. Relational Database Theory Physical Database Design.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
1 Oracle Database 11g – Flashback Data Archive. 2 Data History and Retention Data retention and change control requirements are growing Regulatory oversight.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
1 Robert Wijnbelt Health Check your Database A Performance Tuning Methodology.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
Improving Efficiency of I/O Bound Systems More Memory, Better Caching Newer and Faster Disk Drives Set Object Access (SETOBJACC) Reorganize (RGZPFM) w/
Materialized Views Acknowledgement to Author: Willie Albino.
Oracle Advanced Compression – Reduce Storage, Reduce Costs, Increase Performance Session: S Gregg Christman -- Senior Product Manager Vineet Marwah.
7202ICT – Database Administration
Oracle Locking Michael Messina Principal Database Analyst Indiana University.
Oracle Tuning Considerations. Agenda Why Tune ? Why Tune ? Ways to Improve Performance Ways to Improve Performance Hardware Hardware Software Software.
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
Backup and Recovery Overview Supinfo Oracle Lab. 6.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
SEMANTEC 1 Oracle Performance Tuning - Part I Krasen Paskalev Oracle 8i Certified DBA.
15 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Summary.
Oracle tuning: a tutorial Saikat Chakraborty. Introduction In this session we will try to learn how to write optimized SQL statements in Oracle 8i We.
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
Transportation: Refreshing Warehouse Data Chapter 13.
1 Chapter 13 Parallel SQL. 2 Understanding Parallel SQL Enables a SQL statement to be: – Split into multiple threads – Each thread processed simultaneously.
Chapter 4 Logical & Physical Database Design
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
MISSION CRITICAL COMPUTING Siebel Database Considerations.
Query Optimization CMPE 226 Database Systems By, Arjun Gangisetty
Preface 1Performance Tuning Methodology: A Review Course Structure 1-2 Lesson Objective 1-3 Concepts 1-4 Determining the Worst Bottleneck 1-5 Understanding.
1 Chapter 9 Tuning Table Access. 2 Overview Improve performance of access to single table Explain access methods – Full Table Scan – Index – Partition-level.
Oracle9i Performance Tuning Chapter 4 Tuning the Shared Pool Memory.
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
I NTRODUCTION OF W EEK 2  Assignment Discussion  Due this week:  1-1 (Exam Proctor): everyone including in TLC  1-2 (SQL Review): review SQL  Review.
What is Oracle ? Oracle is a relational database management system. It is a management system which uses the relational data model. In the relational data.
A deep dive into SQL Server Plan Cache Management.
Oracle Database Architectural Components
Hitting the SQL Server “Go Faster” Button Rob Douglas #509 | Brisbane 2016.
Chapter 21 SGA Architecture and Wait Event Summarized & Presented by Yeon JongHeum IDS Lab., Seoul National University.
Query Optimization Techniques
Hitting the SQL Server “Go Faster” Button
Informatica PowerCenter Performance Tuning Tips
Hitting the SQL Server “Go Faster” Button
Index Index.
Presentation transcript:

Tuning a Very Large Data Warehouse Pichai Bala

About Me Working in the IT industry for the past 17 years Working in Oracle since Working in Data Warehouse and BI since 2003

Disclaimer The views expressed in this presentation are mine and does not represent the organization I work for or the organizations I had worked for in the past. Please always test and validate the ideas presented here in a test environment first.

A Day in the life of a DBA

How about this one?

What the chaos mean for the DBA? Free buffer waits enq: KO - fast object checkpoint enq: TM - contention db sequential read CPU time Logical I/O Physical I/O

What it means to the End Users? ETL Load/Batch Job Delays Reporting Delays Decision Making Delays Business Analytics Delays Customer Intelligence Delays Planning and Forecasting Delays Key Performance Metrics Delays

Data Warehouse is now in Death Bed

But, Why?

Data Warehouse Vicious Cycle Data gets deployed Gains User Acceptance More Users and More Demands and Needs Existing Data Grows and New Data gets Deployed …and gets into the Death Spiral

Possible Causes…. Lack of proper and meaningful maintenance Human errors Poor Design Bad SQLs by developers, users Poor monitoring and scheduling etc..

Tuning Strategy Keep it Simple Low Intensity Changes with low impact but with high performance benefits Localized changes No change in logic Easy to understand, test and deploy

Reduce Wastage Reduce CPU Reduce Logical IO Reduce Physical IO Reduce UNDO Reduce Direct Path Reads

How it can be done? Server Tuning Instance Tuning and Maintenance Database Tuning and Maintenance Table Reorganizations/Redefinitions New Indexes Regular Statistics Collection Views SQL/PLSQL Code Changes Working with other teams Educating/Training the users

Instance/Database Tuning SGA Max Size DB Cache Size Shared Pool Large Pool No. of DB Writers Redo Log File Size Typical Init.ORA parameters like QUERY_REWRITE, BITMAP_MERGE_JOIN

SQL/PLSQL Tuning Avoid Clutter Use Indexes when appropriate Full Table Scan is not bad Revisit the code Cunning code is not always necessary Work with other teams and business to reduce complexity in code Avoid Hints

Query Results can be wrong In 10G use ORDER BY whenever GROUP BY is used Hidden parameter can be enabled with the help of Oracle Support

Pillars of the Data Warehouse Partitioning Parallelism Aggregations Compression Materialized Views Read Only Tablespaces Data Archival

Partitioning Range Partitioning List Partitioning Range List Partitioning Range Hash Partitioning Hash Partitioning Caveat: Joins beware.

Parallelism Tables can be built parallel Parallel Indexes Parallel Hints while loading or querying. Alter table move … parallel (degree 8) …; Alter table split … parallel( degree 4) …; Create table parallel(degree 4)… Sufficient LARGE_POOL helps greatly

Aggregations Aggregations and MVs are the soul of any DSS Most BI tools supports Aggregation Awareness Have multiple aggregations Aggregations help users with adhoc queries Daily, Monthly and Yearly Aggregations are very common in most DSS

Compression Saves Disk Space by 40 to 50% Reduces Logical IO Reduces Physical IO Reads will be fast DMLs will be slow Compress Table as well as Index Caveat : You cant uncompress after the table is compressed ORA-01735: invalid ALTER TABLE option

Materialized View Fast Refresh may be very slow From 10G MV can be parallel MVs can be partitioned MV_CAPABILITY results can be misleading. ALTER MATERIALIZED VIEW parallel (degree 4 ); For MV Fast Refresh to be successful a Complete Refresh should happen before

Exchange Partitions Very Useful Dictionary update only Cant Exchange a table with bitmap indexes with a partition Partition exchange has issue with BITMAP indexes with the ora error for mismatch indexes 0RA-14098

READONLY Tablespaces Data Warehouse has time variant non- volatile data Say Range Partition on TIME, and making historic tablespaces READONLY helps Database Checkpoint process

Data Archival With various regulatory and internal requirements data needs to be retained for 2 to 30 years. Data growth is exponential Archival is needed to start it small and keep it small Saves $$$ in Database licenses and maintenance. Helps the optimizer to get results faster from a smaller set

Rolling Partitions If design permits instead of creating new partitions every time the same partition can be reused again and again. Like SUNDAY can be reloaded again on the same partition next Sunday. Rolling Partitions by HOUR or by DAY of the WEEK can be considered Helps Data Retention Strategies too.

Case of HUGE UNDO More than 30G of UNDO was getting generated for a 1.5G table Fix the code and fix the problem.

Misleading V$lock Blocking locks wont show in v$lock but locks would exist Use x$kgllk or x$kglpn to identify and kill the blocking sessions.

Package Invalidations Package gets invalidated but cant recompile itself because of sessions holding them invisibly Coding and deployment standards can help

ORA-02049: timeout: distributed transaction waiting for lock Flush the Shared Pool, the failures go away From 10G you can avoid bounces by flushing buffer_cache and shared_pool

Again?

Stuck in traffic? Meet the new supercar based on Ferrari that could fly you out of jams. * Only £500,000.

Flying Ferrari