BISM:Multidimensional vs. TabularMarco RussoSenior ConsultantSQLBI
What we’ll discuss
History recap & roadmapxVelocityPatterns comparisonConsiderations about porting/migrationWho wins?
UDM was born in 2005
Once upon a time, there was UDMUnified Dimensional ModelOnly one BI data modeling tool
2012: BI Semantic Model
There was UDM, now there is BISMBusiness Intelligence Semantic Model
Only one BI data modeling toolDivided in two flavors
TabularMultidimensional
Now there are two modeling techniquesUnder a single technology
BI Semantic Model: Vision
BI Semantic Model
Data model
Business logic and queries
Data access ROLAP MOLAPxVelocityVertiPaq
DirectQuery
MDX DAX
Multi-dimensional
Tabular
Third-partyapplications
ReportingServices Excel PowerPivot
Databases LOB Applications Files OData Feeds Cloud Services
SharePointInsights
Power View
Tabular: the new kid in town
Part of the BISM visionSuper-duper fast xVelocity in-memory engineAmazing compression ratio of tablesBased on the relational data modelProgrammed with the new DAX languageWhen compared with OLAP
Quite always faster. Much fasterEasier to learn and use
Is This The Right Approach?
1. I am xVelocity, your new engine
2. Thou shalt have no other engine before me
Or is it Better to Investigate?
1. I have two engines now2. What are their strenghts?3. When should I choose one
against the other?
Analysis Services Server Mode
Choose server mode of Analysis ServicesDeploymentMode setting in msmdsrv.ini
0 – Multidimensional and Data Mining (default)1 – SharePoint2 – Tabular
Different icons in Object ExplorerSame code, different behaviorChoice at the INSTANCE levelTwo SSAS instances needed to use both
What is xVelocity in-memory?
In-memory databaseBased on the relational methodologyColumn oriented databaseData is stored in a compressed format
Row Storage Layout
ID Name Address City State Bal Due
1 Bob … … … 3,000
2 Sue … … … 500
3 Ann … … … 1,700
4 Jim … … … 1,500
5 Liz … … … 0
6 Dave … … … 9,000
7 Sue … … … 1,010
8 Bob … … … 50
9 Jim … … … 1,300
1 Bob … … … 3,000
2 Sue … … … 500
3 Ann … … … 1,700
4 Jim … … … 1,500
5 Liz … … … 0
6 Dave … … … 9,000
7 Sue … … … 1,010
8 Bob … … … 50
9 Jim … … … 1,300
Nothing special here. This is the standard way database systems have been laying out tables on disk since the mid 1970s.Technically, it is called a “row store”
Customers Table
Column Storage Layout
ID Name Address City State Bal Due
1 Bob … … … 3,000
2 Sue … … … 500
3 Ann … … … 1,700
4 Jim … … … 1,500
5 Liz … … … 0
6 Dave … … … 9,000
7 Sue … … … 1,010
8 Bob … … … 50
9 Jim … … … 1,300
Tables are stored “column-wise” with all values from a single column stored in a single block
Customers Table
ID
1
2
3
4
5
6
7
8
9
Name
Bob
Sue
Ann
Jim
Liz
Dave
Sue
Bob
Jim
Address
…
…
…
…
…
…
…
…
…
City
…
…
…
…
…
…
…
…
…
State
…
…
…
…
…
…
…
…
…
Bal Due
3,000
500
1,700
1,500
0
9,000
1,010
50
1,300
Column vs Row Storage
Column StorageQuick access to a single columnTime needed to materialize rowsTrade CPU vs I/O
Row StorageQuick access to a single rowNo materialization neededTrade I/O vs CPU
Run Length Encoding (RLE)Quarter
Q1
Q1
Q1
Q1
Q1
Q1
…
Q2
Q2
Q2
Q2
Q2
Q2
Q2
Q2
Q2
…
Quarter Start Count
Q1 1 310
Q2 311 290
… … …
ProdID Start Count
1 1 5
2 6 3
… … …
1 51 5
2 56 3
ProdID
1
1
1
1
1
2
2
2
…
1
1
1
1
1
2
2
2
Price
100
120
315
100
315
198
450
320
320
150
256
450
192
184
310
251
266
Price
100
120
315
100
315
198
450
320
320
150
256
450
192
184
310
251
266
RLE Compression applied onlywhen size of compressed datais smaller than original
xVelocity Store
Dictionary EncodingQuarter
Q1
Q1
Q1
Q1
Q2
Q2
…
Q2
Q3
Q3
Q3
Q3
Q4
Q4
Q4
Q4
…
Only 4 values.2 bits are enough torepresent it
DISTINCT
Q.ID Quarter
0 Q1
1 Q2
2 Q3
3 Q4
Q.ID
1
1
1
1
2
2
…
2
3
3
3
3
4
4
4
4
…
R.L.E.
Q.ID Start Count
1 1 4
2 5 10
3 11 4
4 15 15
xVelocity works only in-memory
Compressed dataMust fit in memoryOtherwise, it simply does not work
On the hardware side this meansVery fast CPUVery fast memoryDisks are not important at all
Which Server for SSAS?Feature Multidimensional Tabular
RAM Some (16/32 Gb) A lot (64/128 Gb)
RAM Speed Important Crucial
Number of cores 4/8/16 4/8/16
Core speed Less Important Crucial
Disk speed Very Important Useless
SSD Disk Usage Strongly recommended Useless
Network speed Important Important
Concurrency Pretty good Not enough experience…
Ideally, don’t use the sameserver for both
Main Limitations of Tabular
Database must fit in memoryMissing Features
No support for translationsNo concept of «Set»
MDX Script not availableOnly plain vanilla 1:M relationships
Distinct Count in Multidimensional
In Multidimensional they are a painDedicated measure groupPartitioning needed for performance
Based on the number of coresDesigned for the hardware
Poor processing performanceORDER BY during processingOn the fact table…
Distinct Count in Tabular
Simply… easy as you might wantDistinct Count on any columnDictionary encoding helps a lotIn-memory calculationsNo special processing for Distinct CountsNo partitioning neededNo special measure group
What about aggregations?
Hard to designIf you don’t rely on the wizardWhich you should not!
Improvement on a subset of queriesNeed to check them periodicallyUsage Based Optimizations helps
But it is hard to manageIn Tabular? They are gone. No aggregation!
Leaf-Level Calculations
Several scenariosWeighted aggregationsCurrency conversion
Easy to compute in DAXMuch faster than MDXDon’t require changes in the data model
Snapshot Based Patterns
Snapshot-based analysis patterns:WarehouseBalance AccountPortfolioInsurance Policy
Snapshot Table
Dim_Date
PK ID_Date
Date Year Month Day
Fact_Movements
PK ID_Movement
FK1 ID_DateFK2 ID_Product Quantity
Dim_Product
PK ID_Product
Product
Snapshot
PK ID_Snapshot
FK1 ID_DateFK2 ID_Product Quantity
Warehouse Data Model
Dim_Date
PK ID_Date
Date Year Month Day
Fact_Movements
PK ID_Movement
FK1 ID_DateFK2 ID_Product Quantity
Dim_Product
PK ID_Product
Product
MDX Query
WITH MEMBER MEASURES.Stock AS SUM ( NULL : [Date Order].[Calendar].CURRENTMEMBER, [Measures].[Quantity] )
SELECT Stock ON 0, NON EMPTY [Product].[Product].[Product].MEMBERS * [Date Order].[Calendar].[Month].MEMBERS ON 1FROM [Movements]
DAX Query
Stock :=
CALCULATE( SUM (FactMovements[OrderQuantity]), FILTER( ALL (DimTime), DimTime[TimeKey] <= MAX(DimTime[TimeKey]) ) )
Snapshot Based Patterns in VertiPaq
Snapshot is almost always required in Multidimensional
Typical Pattern in Dimensional ModelingSnapshot can be avoided in Tabular
Dynamic calculation at a point-in-timeSmaller memory footprint, better performance and flexibility
Many-to-Many Relationships
Not so bad in MultidimensionalCritical issue: size of bridge tableHard to optimizeBad usage of aggregations
Not available in Tabular as part of the data modelBut great support in DAX and VertiPaq!Amazingly fast performance
Tool Dimensions
Common SSAS techniqueOne tool dimensions modifies calculationsFrequently used for the time dimensionTechnique based on
[Measures].CurrentMemberSCOPE statement
Features not available in DAX…Complex DAX code needed to solve it
Parent / Child Hierarchies
Multidimensional supports P/C hierarchiesBut they are slowThus, you naturalize them
Tabular supports only naturalized hierarchiesThey are standard hierarchiesAnd they are fast
HideMemberIf property not availableCan be created using DAXNot an easy task, but it works just fine
Unary Operators
Multidimensional supports unary operatorsFrequently used on P/C hierarchiesPretty slow calculations
Used on financial cubesOn pre-aggregated dataProvide a very nice user experience
No support in Tabular for unary operatorsUse DAX to implement themFormulas tend to be very complex
Custom Rollups
Unary operators on steroidsData driven calculations
Pretty slow, but they workAgain, on small financial cubesOr to implement currency conversion
No support in TabularData-driven cannot be implemented in DAXBut currency conversion can run faster
MDX Script is not Available
Usages of MDX ScriptSimple calculationsMore complex SCOPESEntire business logic
Should you store business logic in MDX?No, reallySometimes it is necessaryAnd DAX is not the best option
Anyway, try to move business logic in ETL
Hierarchy Usage
Hierarchies in MultidimensionalOne of the modeling pillarsE.g. «Ratio To Parent»
Hierarchies in TabularCollection of columnNo function to handle them in DAXRatio to parent is pretty hard
Not a big issue, after allUsers will adapt to the limitation
Should I Migrate My Solutions?
Not necessarilyDifferent modeling options
Calculated columnsComplex Relationships in DAX
Different calculation techniquesEvaluation Contexts
Migrating means building a new project
And the winner is….
Magic consultant’s answer: it dependsTabular is not the new UDM
It is one of the flavors of BISMSide by side with Multidimensional
DAX is easier to learn and to useDifferent modeling techniques
FAQ and Other Tips
Should I migrate from Multidimensional to Tabular?No
I already have Multidimensional cubes and I know MDX
Continue using Multidimensional by defaultConsider Tabular for specific data marts / reports / calculations
I am new to Analysis ServicesStart with Tabular, it’s easier to learn, but check requirements first
What’s the Best Choice Based on Requirements?
Choose Multidimensional:Support Translations within the data modelCalculations strongly depend on hierarchies
Consider Tabular:Several Distinct Count measures on large tablesComplex many-to-many calculations with large bridge tablesPartition a dimensionNOTE: you have to buy enough RAM
Call to Action for Tabular
Learn DAXSeriously, learn it!DAX is not easy, but it is simple!
Learn different modeling techniquesSpend time to get acquainted with this new kidBuild some prototypes
Don’t make a porting, build a new projectLearn to think in DAX
Related Content
DBI305 Developing and Managing a BI Semantic Model in Analysis Services
DBI413 Many-to-Many Relationships in BISM Tabular
DBI62-HOL Optimizing a MS SQL Server 2012 Tabular BI Semantic Model
Track Resources
@sqlserver@TechEd_europe
#msTechEd
mvaMicrosoft Virtual Academy
SQL Server 2012 Eval Copy
Get Certified!
Hands-On Labs
Resources
Connect. Share. Discuss.
http://europe.msteched.com
Learning
Microsoft Certification & Training Resources
www.microsoft.com/learning
TechNet
Resources for IT Professionals
http://microsoft.com/technet
Resources for Developers
http://microsoft.com/msdn
Evaluations
http://europe.msteched.com/sessions
Submit your evals online
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to
be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS
PRESENTATION.
Who’s Speaking?
BI Expert and ConsultantFounder of www.sqlbi.com
Problem SolvingComplex Project AssistanceDataWarehouse Assesments and DevelopmentCourses, Trainings and Workshops
Book WriterMicrosoft Business Intelligence PartnerSSAS Maestro – MVP – MCP