You are on page 1of 51

Essbase ASO Per f or manc e

Essbase ASO Per f or manc e


When NOT to Depend on MDX
Dan Pressman
nTuple, LLC
Dan Pressman, nTuple, LLC 2
Agenda
Agenda
Introduction
Objectives
How and Why Relying on MDX Can Hurt
Performance
ASO Cubes and how they calculate
ASO Hierarchies and how they interact
ASO Aggregations
Real-World Examples
The Normal Way and How to Cheat
Dan Pressman, nTuple, LLC 3
Obj ec t i ves
Obj ec t i ves
Design Hierarchies to Improve Performance of:
YTD, QTD and MTD calculations
Average Daily Balance calculations
Alternate Hierarchies
Reduce Dependence on Aggregation
Hierarchy Design Greatly Affects Performance
Dan Pressman, nTuple, LLC 4
ASO Cubes
ASO Cubes
How many people have seen an ASO cube?
Are you sure?
Maybe youve just worked with them?
An ASO cube you can see and touch
Dan Pressman, nTuple, LLC 5
A Pr e
A Pr e
-
-
Comput er ASO Cube
Comput er ASO Cube
Dan Pressman, nTuple, LLC 6
Pr e
Pr e
-
-
Comput er Fac t Dat a
Comput er Fac t Dat a
Dan Pressman, nTuple, LLC 7
Pr e
Pr e
-
-
Comput er Fac t Dat a
Comput er Fac t Dat a
Coded FactData:
Punched holes represent
MetaData
Notches represent the
absence of MetaData
Holes & Notches for both:
Level 0 metadata
Upper Level metadata
FactData Printed on the
card body
Manual Calculation
Dan Pressman, nTuple, LLC 8
Pr e
Pr e
-
-
Comput er Quer yi ng
Comput er Quer yi ng
Dan Pressman, nTuple, LLC 9
Pr e
Pr e
-
-
Comput er Quer yi ng
Comput er Quer yi ng
Queries performed with
knitting needles
aka Sorting Needles
Multiple query passes
through the data were
required
Unless you had
Dan Pressman, nTuple, LLC 10
Pr e
Pr e
-
-
Comput er Quer yi ng
Comput er Quer yi ng
The new and improved
Multi-Processor Model
Dan Pressman, nTuple, LLC 11
ASO
ASO
Met aDat a
Met aDat a
Codi ng
Codi ng
In Essbase, ASO cubes
work the same way for
stored hierarchies:
The Holes and Notches are
replaced by a bitmap as
seen on the statistics page:
Dan Pressman, nTuple, LLC 12
ASO
ASO
Met aDat a
Met aDat a
Codi ng
Codi ng
In Essbase, ASO cubes work the same way for
stored hierarchies:
The Holes and Notches are replaced by bitmap
The needles are replaced by a bitmap mask
The mask passes through all of the FactData cards
If all of the cards are:
Coded with upper-level members and alternate hierarchies
i.e. Stored Hierarchies
In the same card box (i.e., memory)
Then Queries are fast and simple
Dan Pressman, nTuple, LLC 13
ASO Fac t Dat a Codi ng
ASO Fac t Dat a Codi ng
In Essbase, each Level 0 FactData cell:
In Stored Dimensions/Hierarchies:
Has a bitmap indicating its L0 identity (sibling position) in
the primary hierarchy
Has a bitmap indicating its full ancestry in its primary
hierarchy
No additional bitmap is required indicating its L0 identity in
any alternate hierarchies
Has a bitmap indicating its full ancestry in any alternate
hierarchies
Dan Pressman, nTuple, LLC 14
ASO Fac t Dat a Codi ng
ASO Fac t Dat a Codi ng
In Essbase, each Level 0 FactData cell also has:
In Dynamic Dimensions/Hierarchies:
A bitmap indicating its L0 identity amongst any stored (non-
share) members
And of course:
8 bytes of real, live FactData
Dan Pressman, nTuple, LLC 15
ASO Bi t map Codi ng
ASO Bi t map Codi ng
Paying attention to the metadata bitmap as seen on the
Statistics Page is important because:
The number of metadata bits is rounded up to the nearest 64-bit
(8 byte) multiple
Each 8-byte FactData cell has at least 8 bytes of metadata
attached
When there are hundreds of millions of FactData cells, a few bits
here and a few bits there multiply
Increase in the Input-Level data size increases the size of the
card box (memory) required
Remember, ASO queries are fast if all of the cards fit in memory
Dan Pressman, nTuple, LLC 16
ASO Quer i es
ASO Quer i es
Stored Hierarchies: Fast - allow ASO to be ASO
All queries are eventually resolved to be a
combination of queries against the stored dimensions
Each stored query is a bitmap-mask pass through the
database
Performance is therefore based on the Input-Level Data Size
All stored dimension queries against the same Aggregation
level should be equal
Note: possible exception across multiple members of the
compression dimension
Calculation order for dynamic dimensions is critical
keep them high up
Dan Pressman, nTuple, LLC 17
ASO Quer i es
ASO Quer i es
It can be worth paying the cost of increasing the
bitmap and the Input-Level data size to increase
performance without Aggregation
There are also ways to design the hierarchy to
minimize the size
Dynamic queries can be used as dimension
translators to redirect to a stored compound
hierarchy hidden in another dimension
Dan Pressman, nTuple, LLC 18
ASO Bi t map Si ze Cal c ul at i on
ASO Bi t map Si ze Cal c ul at i on
The bitmap is sized as follows for each dimension:
For Stored Hierarchies:
The sum for each level of the hierarchy of
The number of bits required to represent the number of non-
shared siblings of the widest family of siblings for that level
For Dynamic Hierarchies:
The number of bits required to represent the count of all
stored, non-shared members of the hierarchy
Note: Dimensions with only one stored member do not
require any bits in the bitmap
Dan Pressman, nTuple, LLC 19
ASO Bi t map Si ze Cal c ul at i on
ASO Bi t map Si ze Cal c ul at i on
Bitmap Size, continued:
For Dimensions with Multiple Hierarchies enabled:
The number of bits required to represent the number of non-
shared siblings of the widest family of siblings for that level
across all hierarchies for that dimension
The number of stored, non-shared members for dynamic
hierarchies are considered to be at level 0
Plus the number of bits required to represent the number
hierarchies in the dimension
If there is only one hierarchy for the dimension, the number of
bits required is zero, even if Multiple Hierarchies are enabled
The sum of the bits across all dimensions is then rounded up to the
nearest multiple of 64
Dan Pressman, nTuple, LLC 20
ASO Bi t map Codi ng Ex ampl e
ASO Bi t map Codi ng Ex ampl e
Dan Pressman, nTuple, LLC 21
ASO Bi t map Codi ng Ex ampl e
ASO Bi t map Codi ng Ex ampl e
Dan Pressman, nTuple, LLC 22
ASO Bi t map Codi ng Summar y
ASO Bi t map Codi ng Summar y
Similar-sized families reduce cost
Ragged hierarchies impose little penalty
The widest levels are usually at the bottom and are
compared with other bottom levels no matter how
many generations down
Alternate hierarchies are not expensive
Only the upper-level members are stored
Analysis dimensions (TimeSpan, Variance) with
only one stored member impose no size cost
Dan Pressman, nTuple, LLC 23
ASO Bi t map Codi ng Ot her
ASO Bi t map Codi ng Ot her
Label-Only Members impose no size cost
They can be used freely, particularly in Dynamic
Hierarchies to improve readability
Implicit Sharing is still around
Even with Never Share enabled, the only child
exists only in the outline and is not represented
explicitly in the bitmap
Never Share appears only to have bearing in the
cell count calculation for partitions
Dan Pressman, nTuple, LLC 24
ASO Aggr egat i ons
ASO Aggr egat i ons
Are like a DB copy with a different (shortened)
bitmap
Remember, stored alternate hierarchies cannot
use upper-level members from the primary
hierarchy
Consider loading aggregate levels of data to
enhance performance
Data loads are fast
Data either can be loaded twice or aggregated at the
source for the upper-level load
Dan Pressman, nTuple, LLC 25
Ex ampl es
Ex ampl es
These examples demonstrate different ways of
calculating YTD Results based on different cube styles:
Style A
Year Dimension
Month Dimension
Day Dimension
Style B
Year Dimension
Combined Month/Day Dimension
Style C
Combined Year/Month/Day Dimension
Each Style has a timespan dimension as well as four
other dimensions
Dan Pressman, nTuple, LLC 26
Ex ampl e
Ex ampl e


St yl e A2
St yl e A2
Dan Pressman, nTuple, LLC 27
Ex ampl e
Ex ampl e


St yl e A2
St yl e A2
Using MDX to sum 17 days and sum 6 months
J uly 17
th
YTD MDX:
SUM(PeriodsToDate([Day].Levels (0) , [Day].CurrentMember
), [TimeSpan].[Per])
+ SUM(PeriodsToDate([Month].Levels (0), PrevMember (
[Month].CurrentMember, Level ) ), ( [TimeSpan].[Per],
[FullMonth]))
Requires 23 bitmap passes through the data:
Dan Pressman, nTuple, LLC 28
Ex ampl e
Ex ampl e


St yl e B1
St yl e B1
Dan Pressman, nTuple, LLC 29
Ex ampl e
Ex ampl e


St yl e B1
St yl e B1
Using MDX to sum 197 days
J uly 17
th
YTD MDX:
SUM(PeriodsToDate([Period].CurrentMember.Level,
[Period].CurrentMember ), [TimeSpan].[Per])
Requires 197 bitmap passes through the data
Dan Pressman, nTuple, LLC 30
Ex ampl e
Ex ampl e


St yl e C1
St yl e C1
Dan Pressman, nTuple, LLC 31
Ex ampl e
Ex ampl e


St yl e C1
St yl e C1
Using MDX to sum 197 days
J uly 17
th
YTD MDX:
SUM(PeriodsToDate([Date].Levels (0) ,
[Date].CurrentMember ), [TimeSpan].[Per])
Requires 197 bitmap passes through the data
Dan Pressman, nTuple, LLC 32
Ex ampl e
Ex ampl e


Bi t map Si zes
Bi t map Si zes
Dan Pressman, nTuple, LLC 33
Ex ampl e
Ex ampl e


St yl e B2
St yl e B2
Using Improved MDX to sum 17 days and sum 6
months
J uly 17
th
YTD MDX:
SUM(tuplerange( ( [Period].CurrentMember.FirstSibling
, [TimeSpan].[Per])
, ( [Period].CurrentMember, [TimeSpan].[Per])))
+ SUM(PeriodsToDate([Period].CurrentMember.Parent.Level,
[Period].CurrentMember.Parent ), [TimeSpan].[Per])
Requires 23 bitmap passes through the data:
Dan Pressman, nTuple, LLC 34
Ex ampl e
Ex ampl e


St yl e C2
St yl e C2
Using Improved MDX to sum 17 days and sum 6
months
J uly 17
th
YTD MDX:
SUM(tuplerange( ( [Date].CurrentMember.FirstSibling
, [TimeSpan].[Per])
, ( [Date].CurrentMember, [TimeSpan].[Per])))
+ SUM(PeriodsToDate([Date].CurrentMember.Parent.Level,
[Date].CurrentMember.Parent ), [TimeSpan].[Per])
Requires 23 bitmap passes through the data:
Dan Pressman, nTuple, LLC 35
Ex ampl e
Ex ampl e


St yl e A3
St yl e A3
Using ASO to roll up
the 17 days
MDX to sum the 6
months
Dan Pressman, nTuple, LLC 36
Ex ampl e
Ex ampl e


St yl e A3
St yl e A3
Using ASO to roll up the 17 days
MDX to sum up the 6 months
J uly 17
th
YTD MDX:
INSERT HERE ******
Requires 7 bitmap passes through the data
Bitmap for the time dimensions increase from 11 to 39 bits
Dan Pressman, nTuple, LLC 37
Ex ampl e
Ex ampl e


St yl e A4
St yl e A4
Using ASO to roll up the
17 days
A separate load of full-
month totals
Then use ASO to roll up
the full-month totals
Dan Pressman, nTuple, LLC 38
Ex ampl e
Ex ampl e


St yl e A4
St yl e A4
Using ASO to roll up the 17 days
A separate load of full-month totals
Then use ASO to roll up the full-month totals
J uly 17
th
YTD MDX:
INSERT HERE ******
Requires 2 bitmap passes through the data
Bitmap for the time dimensions increase from 11 to 45 bits
Dan Pressman, nTuple, LLC 39
Ex ampl e
Ex ampl e


St yl e B4
St yl e B4
Using ASO to
roll up the 17
days
Using ASO to
Roll up the 6
full-months (no
separate load
required)
Dan Pressman, nTuple, LLC 40
Ex ampl e
Ex ampl e


St yl e B4
St yl e B4
Using ASO to roll up the 17 days
Using ASO to Roll up the 6 full-months (no separate
load required)
J uly 17
th
YTD MDX:
INSERT HERE ******
Requires 2 bitmap passes through the data
Bitmap for the time dimensions increase from 12 to 38 bits
Dan Pressman, nTuple, LLC 41
Ex ampl e
Ex ampl e


St yl e B5
St yl e B5
Using a separate
load of monthly
YTD totals
Then use ASO to
roll up the 17
days and the
prior month YTD
Dan Pressman, nTuple, LLC 42
Ex ampl e
Ex ampl e


St yl e B5
St yl e B5
Using a separate load of monthly YTD totals
Then use ASO to roll up the 17 days and the prior
month YTD
J uly 17
th
YTD Simple MDX:
INSERT HERE ******
Requires 1 bitmap passes through the data
Bitmap for the time dimensions increase from 12 to 39 bits
Dan Pressman, nTuple, LLC 43
Ex ampl e
Ex ampl e


St yl e C3
St yl e C3
Using ASO to
roll up the 17
days
MDX to sum up
the 6 months
Dan Pressman, nTuple, LLC 44
Ex ampl e
Ex ampl e


St yl e C3
St yl e C3
Using ASO to roll up the 17 days
MDX to sum up the 6 months
J uly 17
th
YTD MDX:
INSERT HERE ******
Requires 7 bitmap passes through the data
Bitmap for the time dimensions increase from 12 to 38 bits
Dan Pressman, nTuple, LLC 45
Ex ampl e
Ex ampl e


St yl e C5
St yl e C5
Using a separate
load of monthly
YTD totals
Then use ASO to
roll up the 17
days and the
prior month YTD
Dan Pressman, nTuple, LLC 46
Ex ampl e
Ex ampl e


St yl e C5
St yl e C5
Using separate load of monthly YTD totals
Then use ASO to roll up the 17 days and the prior
month YTD
J uly 17
th
YTD Simple MDX:
INSERT HERE ******
Requires 1 bitmap passes through the data
Bitmap for the time dimensions increase from 12 to 39 bits
Dan Pressman, nTuple, LLC 47
ASO Ex ampl e
ASO Ex ampl e


St yl e B5 & C5
St yl e B5 & C5
No Aggregation needed on this dimension
Turn it off
Squeeze the YTDs to get QTDs and HTDs
Rolling time spans require 1 pass in C5 if within
the year and 3 in B5 (if spanning years)
Dan Pressman, nTuple, LLC 48
Ex ampl e
Ex ampl e


St yl e D
St yl e D
Another example which adds the calculation of Average
Daily Balances (ADB). The Monthly YTDs and Monthly
YTD-ADBs are loaded.
Instead of using MDX to redirect the YTD timespans, a
Transparent partion was used from a BSO cube. This
way all of the extra roll ups were hidden from the user.
Dan Pressman, nTuple, LLC 49
ASO Ex ampl e
ASO Ex ampl e


St yl e D
St yl e D
No Aggregation needed on this dimension
Turn it off
Squeeze the YTDs to get QTDs and HTDs
Rolling time spans require 1 pass
Dan Pressman, nTuple, LLC 50
Summar y
Summar y
Let ASO be ASO
Use hidden compound dimensions
Let ASO roll them up
Redirect/translate with MDX to maximize the use of
hidden dimensions
Dan Pressman, nTuple, LLC 51
Q & A
Q & A
Questions, Answers and Discussion
Presenter: Dan Pressman
nTuple, LLC
973 479-5260
DanPress@Optonline.net

You might also like