Sie sind auf Seite 1von 36

Tuning Realtime Data Warehouses - A Guide from the Field

Peter Scott Principal Consultant


T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Who Am I?
One of the first members of Rittman Mead Consulting Specializes in Data Warehouse Design and Performance Experience of several Realtime systems

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Presentation Outline

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Presentation Outline

Why Realtime? The Who and Where of Realtime Tuning Effective Realtime Tuning

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Why Realtime?

Three main use cases


We are too busy reporting to load new data - 24x7 working day Large data volumes take too long to load What happened, I need to know, NOW! - Getting new data in as soon as possible

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Why Realtime?

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Why Realtime?

Things Happen

Things Appear in Reports

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Why Realtime?

Things Happen

Magic

Things Appear in Reports

David Coppereld Model

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Why Realtime?

Things Happen

Data Movement, Data Transformation

Things Appear in Reports

Real World Model

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Presentation Aim

Things Happen

Data Movement, Data Transformation

Things Appear in Reports

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Presentation Aim

Things Happen

Data Movement, Data Transformation

Things Appear in Reports

Making the arrow as short as possible


T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

What is Realtime?

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

What is Realtime?
Data Movement Detect change Extract change Stage change

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

What is Realtime?
Data Movement Detect change Extract change Stage change Data Transformation Apply change Aggregate Publish
T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

What is Realtime?

NOT all data in a Realtime Data Warehouse is Realtime

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Who and Where of Performance


Design

Develop

Test

Operate

Performance ?

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Who and Where of Performance


Design

Develop

Performance ?

Test

Operate

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Who and Where of Performance


Design

Develop

Performance ?

Test

Operate

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Who and Where of Performance

Develop
Design Test

Performance ?

Operate

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Effective Realtime Tuning

Plz do the needful

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Effective Realtime Tuning

Dont process too much data Noise


- Not all change is real change

Poor change detection algorithms


- Dont forget to use simple math to check that data volumes are on a par with query results

Plz do the needful

Late filtering of data Avoid unnecessary processing in realtime database


T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Effective Realtime Tuning

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Effective Realtime Tuning


Realtime is not traditional Data Warehousing Office hours tune for query Out of hours tune for batch

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Effective Realtime Tuning


Realtime is not traditional Data Warehousing Office hours tune for query Out of hours tune for batch We need to tune for both query and transactional data load

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Quick Straw Poll

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Quick Straw Poll


Do you run your data warehouse in Archive Log Mode?

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Quick Straw Poll


Do you run your data warehouse in Archive Log Mode? For realtime need to run database in archive log mode traditional recovery restore DB and reapply batches will not work

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Effective Realtime Tuning


Use DBA tools to monitor where queries stick AWR, ASH, SQL Monitor Look at query plans to determine whether the database is being wise poor plans mean that the database is making a wrong assumption about the data - Make sure we describe the data to the database with constraints and adequate statistics

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Effective Realtime Tuning


Move data in sets Direct path, set operators (union, minus, intersect) Avoid update and delete activities If you must update then consider using indexes - watch out for row migration Use database features to reduce undo Global Temporary Tables Partition Exchange

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Real World Examples


Database Change Data Capture for a e-retailer JMS message services for a high transaction environment

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Database Change Data Capture for a e-retailer


Major on-line seller of entertainment media Computer Games, Video, Music, Digital Download Exadata (V1) data warehouse, Oracle 10g/11gR1 and legacy MSFT SQL Server sources Realtime need around sales processing from 11g source - Must use OWB as ETL platform - Must use Oracle Asynchronous CDC (but not GoldenGate)

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Challenges to performance
Building complete records from partial information Use analytics and set based SQL - extra challenge to handle data becoming NULL! The web-based source systems often issued DB commits (SELECT FOR UPDATE) without data change (aka NOISE!) Need set based code (filtered MINUS)

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

JMS message services for a high transaction environment

Confidential customer Large volume of financial transactions Exadata (V2) data warehouse Realtime feeds through corporate JMS message bus (Tibco) Realtime need to exposure to risk immediately before events - ODI as ETL platform - JMS XML Messages
T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Challenges to performance
Building up complete records from multiple messages Use analytics and set based SQL Merging data into the reporting layer Avoid updates by using insert + partition exchange Need to multiple-thread some ETL steps for performance Use Global Temporary Tables and run threads in their own sessions ETL tool generates large amounts of REDO Move ETL meta data to its own database and run in nor archive log mode
T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Questions???

?
T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com
Monday, 18 February 13

Presentation Takeaways

Performance starts in the design and Development Everyone has a part to play - not just the DBA Avoid doing the unnecessary Monitor, measure, evaluate, prove, never guess Exploit the power of the database

T : +44 (0) 8446 697 995 or (888) 631 1410 (USA) E : enquiries@rittmanmead.com W: www.rittmanmead.com

Monday, 18 February 13

Das könnte Ihnen auch gefallen