aggregate awareness

26
October 2001 Bob Cohen Sense Corp The Aggregate Awareness Decision

Upload: isskumar

Post on 14-Apr-2015

64 views

Category:

Documents


4 download

DESCRIPTION

Aggregate Awareness

TRANSCRIPT

Page 1: Aggregate Awareness

October 2001

Bob CohenSense Corp

The Aggregate Awareness Decision

Page 2: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

3

Presentation Overview

Introduction Overview of aggregate awareness Aggregate awareness in Business Objects RDBMS materialized views for aggregate awareness Examples of each architecture Architectural trade offs Q & A

Page 3: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

4

Introduction

About Bob Cohen Who is the target audience Contact Info

Sense Corp 17 Ramsgate Drive St Louis, MO 63132

[email protected]

Page 4: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

5

What is Aggregate Awareness?

It is the ability to dynamically re-write SQL to the level of granularity needed to answer a business question

Allows for faster querying speed

Document_Id

Line_Item

Customer_Id

Dollars

Customer_Id

Dollars

1,000,000 Rows

1,000 Rows

Page 5: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

6

Setting up Business Objects Aggregate Awareness

Create all tables, joins, and objects at the universe level Specify all aggregate awareness objects

Define contexts Specify join paths

Specify incompatible objects Use aggregate navigation functionality

All aggregated facts physically created during extraction, transformation, and load (ETL)

Page 6: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

7

Business Objects Aggregate Awareness Example

Page 7: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

8

Materialized Views Overview

Increase the query speed of very large data sets Physically stores aggregated and joined data sets at

the database level Can create both simple and complex views Different from traditional database views

Page 8: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

9

Materialized View Vendor Availability

Oracle Sybase Informix

Page 9: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

10

Simple vs. Complex Materialized Views

Simple views Selects rows from only one table Cannot perform any joins, group by functions, or

connect by functions

Complex views Complete refresh of data required

Page 10: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

11

Materialized Views – Alter Execution Path

Query

Result

Optimizer Picks Best

Cost Option

RDBMS

SQL

Query is re-written

Original Query

Page 11: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

12

Setting up Materialized Views

Query re-write needs to be enabled at the database or session level

Following permissions need to be set up for each user that can create a materialized view Create materialized view Create table Create view Create index Unlimited or sufficient space

Each materialized view uses as much space as a physical table

Page 12: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

13

Setting up Materialized Views

To use the alter query execution path functionality, you must set up a dimension The dimension sets a hierarchy for each related dimension

Each materialized view needs to be coded with a create statement on the database

Analyze statistics in order for optimizer to recognize materialized views

Can create an index on materialized view

Page 13: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

14

Materialized View Example

Page 14: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

15

Architectural Trade-Offs 1-3

Business ObjectsBusiness Objects RDBMSRDBMS

Code Location Objects created at the universe level

Manually coded at database level

Metadata Allows for centralized metadata repository

Metadata hidden in complex code

ETL Tables physically created through ETL process

Materialized views created through code

Page 15: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

16

Architectural Trade-Offs 2-3

Business ObjectsBusiness Objects RDBMSRDBMS

Source Specific Can be used against any source

RDBMS must support materialized views; if multiple sources, need to be maintained in each database

Re-Write Location All code re-written before submitted to RDBMS

Re-written in RDBMS

Page 16: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

17

Architectural Trade-Offs 3-3

Business ObjectsBusiness Objects RDBMSRDBMS

Owner of the Code Universe Designer or DW architect

DBA

Visible SQL Yes No

Universe Design Complexity

Yes No

Page 17: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

18

Design Option 1

Keeps design simple Speed is not always a requirement Not all reporting requires aggregation Users know data well enough to know which

tables to query

Do Not Implement any Aggregate Awareness

Page 18: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

19

Design Option 2

Ideal for architecture with many database sources Not every database source supports materialized views Materialized views need to be maintained in every database

source

Implement Aggregate Awareness through BusinessObjects Exclusively

Page 19: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

20

Design Option 2

SQL Server

Oracle 8i

MS Acces

s

BO Reposito

ry

Page 20: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

21

Design Option 2

Need for centralized metadata repository Do not have access to a strong DBA Closed reporting architecture

Takes advantage of strong semantic layer in BusinessObjects

Implement Aggregate Awareness through BusinessObjects Exclusively

Page 21: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

22

Design Option 3

Implement materialized views in RDBMS Ideal for architectures with many reporting tools

Implement Materialized Views in RDBMS

Page 22: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

23

Design Option 3

BO

Custom Report

Application

MS Acces

s

Data Warehous

e

Page 23: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

24

Design Option 3

Need quick results Access to strong DBA Simplify universe design Have one or few sources Do not need a centralized metadata repository

Implement Materialized Views in RDBMS

Page 24: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

25

Design Option 4

Willing to deal with complexity Recognizes advantages in both approaches Able to define advantages for each architecture

Use materialized views for refreshing list of values

Implement Both Materialized Views in RBDMS andAggregate Awareness in BusinessObjects

Page 25: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

26

Design Option 4

Page 26: Aggregate Awareness

Copyright © 2001 Business Objects - All Rights Reserved

27

Q & A

Which approach is best for you