SlideShare a Scribd company logo
1 of 31
Download to read offline
NASI SPONSORZY I PARTNERZY
(More) Common Analysis Services
Multidimensional Design Mistakes and How to
Avoid Them

Chris Webb
Who Am I?
•

Chris Webb
• Email: chris@crossjoin.co.uk
• Twitter @Technitrain

•
•

Analysis Services consultant and trainer:
www.crossjoin.co.uk & www.technitrain.com
Co-author:
• MDX Solutions
• Expert Cube Development with SSAS 2008
• Analysis Services 2012: The BISM Tabular Model

•
•

SQL Server MVP
Blogger: http://cwebbbi.wordpress.com
Agenda
•
•
•
•
•
•
•
•
•

Why good cube design is a Good Thing
Using built-in best practices in BIDS
Precon recap
Parent/child pain
MDX vs modelling
Partition elimination
Unused and/or unprocessed aggregations
NON_EMPTY_BEHAVIOR
Cell Security
Why Good Design is Important!
• As if you needed reasons…?
• Good design
=
good performance
=
faster initial development
=
easy further development
=
simple maintenance
• This is not an exhaustive list, but a selection of design
problems and mistakes I’ve seen on consultancy
engagements
Best Practices in BIDS
• Don’t ignore the blue squiggly lines in BIDS!
– They sometimes make useful recommendations about
what you’re doing

• Actively dismissing them, with comments, is a useful
addition to documentation
• As always, official ‘best practices’ aren’t always best
practices in all situations
Common Design Mistakes
• Three questions need to be asked:
– What’s the problem?
– What bad things will happen as a result?
– What can I do to fix it (especially after I’ve gone into
production)?

• This is not a name-and-shame session!
Stuff From My Precon
•
•
•
•

Don’t use unfriendly names
Don’t create unnecessary attributes
Don’t do ETL in your DSV
Don’t create many small cubes instead of one big
one
• Don’t create one big cube instead of many smaller
ones

SQLDay 2013
Problem: Parent Child Hierarchies
• Parent Child hierarchies are the only way to model
hierarchies where you don’t know the number of
levels in advance
• They are also very flexible, leading some people to
use them more often than they should
Consequences: Parent Child
• Parent Child hierarchies can lead to slow query
performance
– No aggregations can be built at levels inside the
hierarchy
– Slow anyway

• They can also be a nightmare for
– Scoping advanced MDX calculations
– Dimension security
Fix: Parent Child
• If you know, or can assume, the maximum depth of your
hierarchy, there’s an alternative
• Normal user hierarchies can be made ‘Ragged’ with the
HideMemberIf property
– Hides members if their parent has no name, or the same
name as them

• Still has performance issues, but less than parent/child
• You can use the BIDS Helper “parent/child naturaliser” to
convert the underlying relational table to a level-based
structure
Problem: Over-reliance on MDX
• As with the DSV, it can be tempting to use MDX
calculations instead of making structural changes to
cubes and dimensions
• A simple example is to create a ‘grouping’ calculated
member instead of creating a new attribute
• Other examples include pivoting measures into a
dimension, or doing m2m in MDX
Consequences: Over-reliance on MDX
• MDX should always be your last resort:
• Pure MDX calculations are always going to be the
slowest option for query performance
• They are also the least-easily maintainable part of a
cube
• The more complex calculations you have, the more
difficult it is to make other calculations work
Fix: Over-reliance on MDX
• Redesigning your cube is a radical option but can pay
big dividends in terms of performance
• Risks breaking existing reports and queries but your
users may be ok with this to get more speed
Problem: Partition Elimination
• SSAS will usually only query the partitions that
contain the data it needs
• This depends on the way it stores the minimum and
maximum values of DataIDs (internal keys) in each
partition

SQLDay 2013
Consequences: Partition Elimination
• Slow performance – if SSAS queries too many
partitions for a single query
• Although the extra cache might make future queries
faster…

SQLDay 2013
Fix: Partition Elimination
•
•
•
•

Rewrite your MDX
Set the slice property
Order your members by DataID if possible
Use the connection string properties
Disable Prefetch Cache=True; Cache Ratio=1

SQLDay 2013
Problem: Unused Aggregations
• Aggregations are the most important SSAS feature
for performance
• Most people know they need to build some and run
the Aggregation Design Wizard…
• …but don’t know whether they’re being used or not
Consequences: Unused Aggregations
• Slow queries!
• If you haven’t built the right aggregations, then your
queries won’t get any performance benefit
• You’ll waste time processing these aggregations, and
waste disk space storing them
Fix: Unused Aggregations
• Design some aggregations!
• Rerun the Aggregation Design Wizard and set the
Aggregation Usage property appropriately
• Perform Usage-Based Optimisation
• Design aggregations manually for queries that are
still slow and could benefit from aggregations
Problem: Unprocessed Aggregations
• Even if you’ve designed aggregations that are useful
for your queries, you need to ensure they’re
processed
• Running a Process Update on a dimension will drop
some or all Flexible aggregations (depends on which
version of SSAS)
Consequences: Unprocessed
Aggregations
• Slow queries! (Again)
Fix: Unprocessed Aggregations
• Run a Process Default or a Process Index on your
cube after you have run a Process Update on any
dimensions
• Note that this will result in:
– Longer processing times overall
– More disk space used

• But it will at least mean that your queries run faster
Problem: Non_Empty_Behavior
• The Non_Empty_Behavior property was introduced
in SSAS 2000 as a performance hint
• It was very important in SSAS 2000/2005
• It says:
If Regular Measure A is Null
Then Calculated Measure B will be Null
• But it is usually set incorrectly
• And from SSAS 2008 on it is mostly unnecessary

SQLDay 2013
Consequences: Non_Empty_Behavior
• Setting Non_Empty_Behavior incorrectly can
– At best, make no difference to your performance
– At worst, result in incorrect query results

SQLDay 2013
Fix: Non_Empty_Behavior
• Don’t set it!
• Rewrite your calculations to check for null values:
IIF(
ISEMPTY(MEASURES.A),
NULL,
<CALCULATION>
)

SQLDay 2013
Problem: Cell Security
• Cell security allows you to secure individual cells in a
cube
• At first sight, it is the only option: it does things
dimension security cannot do…

SQLDay 2013
Consequences: Cell Security
• Setting cell security correctly can be very difficult
• Read and read contingent cell security can be even
more confusing
• Performance is often very bad with cell security:
– Forces cell-by-cell mode
– Forces Formula Engine caching to query scope

SQLDay 2013
Fix: Cell Security
• The answer is to use Dimension Security instead
• But how…?
• Create a new dimension that contains the
combinations of members that you want to secure
• Then use Dimension Security on it
• Doesn’t work if you need to secure measures 

SQLDay 2013
Thanks!
NASI SPONSORZY I PARTNERZY

Organizacja: Polskie Stowarzyszenie Użytkowników SQL Server - PLSSUG
Produkcja: DATA MASTER Maciej Pilecki

More Related Content

Viewers also liked

SQLDay2013_DennyCherry_GettingSQLServiceBrokerUp&Running
SQLDay2013_DennyCherry_GettingSQLServiceBrokerUp&RunningSQLDay2013_DennyCherry_GettingSQLServiceBrokerUp&Running
SQLDay2013_DennyCherry_GettingSQLServiceBrokerUp&RunningPolish SQL Server User Group
 
SQL DAY 2012 | DEV Track | Session 9 - Data Mining Analiza Przepływowa by M.S...
SQL DAY 2012 | DEV Track | Session 9 - Data Mining Analiza Przepływowa by M.S...SQL DAY 2012 | DEV Track | Session 9 - Data Mining Analiza Przepływowa by M.S...
SQL DAY 2012 | DEV Track | Session 9 - Data Mining Analiza Przepływowa by M.S...Polish SQL Server User Group
 
SQL DAY 2012 | DEV Track | Session 6 - Master Data Management by W.Bielski 6 ...
SQL DAY 2012 | DEV Track | Session 6 - Master Data Management by W.Bielski 6 ...SQL DAY 2012 | DEV Track | Session 6 - Master Data Management by W.Bielski 6 ...
SQL DAY 2012 | DEV Track | Session 6 - Master Data Management by W.Bielski 6 ...Polish SQL Server User Group
 
26th_Meetup_of_PLSSUG_WROCLAW-ColumnStore_Indexes_byBeataZalewa_scripts
26th_Meetup_of_PLSSUG_WROCLAW-ColumnStore_Indexes_byBeataZalewa_scripts26th_Meetup_of_PLSSUG_WROCLAW-ColumnStore_Indexes_byBeataZalewa_scripts
26th_Meetup_of_PLSSUG_WROCLAW-ColumnStore_Indexes_byBeataZalewa_scriptsPolish SQL Server User Group
 
SQLDay2013_PawełPotasiński_GeografiaSQLServer2012
SQLDay2013_PawełPotasiński_GeografiaSQLServer2012SQLDay2013_PawełPotasiński_GeografiaSQLServer2012
SQLDay2013_PawełPotasiński_GeografiaSQLServer2012Polish SQL Server User Group
 
38Spotkanie_PLSSUGweWroclawiu_Keynote
38Spotkanie_PLSSUGweWroclawiu_Keynote38Spotkanie_PLSSUGweWroclawiu_Keynote
38Spotkanie_PLSSUGweWroclawiu_KeynoteTobias Koprowski
 
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET DeveloperSQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET DeveloperPolish SQL Server User Group
 
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...Polish SQL Server User Group
 
GoldenLine.pl - Od Startupu do... Startupu :-)
GoldenLine.pl - Od Startupu do... Startupu :-)GoldenLine.pl - Od Startupu do... Startupu :-)
GoldenLine.pl - Od Startupu do... Startupu :-)Karol Traczykowski
 
Maintenance_Plans_Zupełnie_Znienacka
Maintenance_Plans_Zupełnie_ZnienackaMaintenance_Plans_Zupełnie_Znienacka
Maintenance_Plans_Zupełnie_ZnienackaTobias Koprowski
 
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)Krzysztof Kotowicz
 

Viewers also liked (19)

SQLDay2013_ChrisWebb_DAXMD
SQLDay2013_ChrisWebb_DAXMDSQLDay2013_ChrisWebb_DAXMD
SQLDay2013_ChrisWebb_DAXMD
 
SQLDay2013_GrzegorzStolecki_RealTimeOLAP
SQLDay2013_GrzegorzStolecki_RealTimeOLAPSQLDay2013_GrzegorzStolecki_RealTimeOLAP
SQLDay2013_GrzegorzStolecki_RealTimeOLAP
 
SQLDay2013_GrzegorzStolecki_KonsolidacjaBI
SQLDay2013_GrzegorzStolecki_KonsolidacjaBISQLDay2013_GrzegorzStolecki_KonsolidacjaBI
SQLDay2013_GrzegorzStolecki_KonsolidacjaBI
 
SQLDay2013_DennyCherry_GettingSQLServiceBrokerUp&Running
SQLDay2013_DennyCherry_GettingSQLServiceBrokerUp&RunningSQLDay2013_DennyCherry_GettingSQLServiceBrokerUp&Running
SQLDay2013_DennyCherry_GettingSQLServiceBrokerUp&Running
 
SQLDay2011_Sesja02_Collation_Marek Adamczuk
SQLDay2011_Sesja02_Collation_Marek AdamczukSQLDay2011_Sesja02_Collation_Marek Adamczuk
SQLDay2011_Sesja02_Collation_Marek Adamczuk
 
SQLDay2013_MaciejPilecki_Lock&Latches
SQLDay2013_MaciejPilecki_Lock&LatchesSQLDay2013_MaciejPilecki_Lock&Latches
SQLDay2013_MaciejPilecki_Lock&Latches
 
SQL DAY 2012 | DEV Track | Session 9 - Data Mining Analiza Przepływowa by M.S...
SQL DAY 2012 | DEV Track | Session 9 - Data Mining Analiza Przepływowa by M.S...SQL DAY 2012 | DEV Track | Session 9 - Data Mining Analiza Przepływowa by M.S...
SQL DAY 2012 | DEV Track | Session 9 - Data Mining Analiza Przepływowa by M.S...
 
SQL DAY 2012 | DEV Track | Session 6 - Master Data Management by W.Bielski 6 ...
SQL DAY 2012 | DEV Track | Session 6 - Master Data Management by W.Bielski 6 ...SQL DAY 2012 | DEV Track | Session 6 - Master Data Management by W.Bielski 6 ...
SQL DAY 2012 | DEV Track | Session 6 - Master Data Management by W.Bielski 6 ...
 
26th_Meetup_of_PLSSUG_WROCLAW-ColumnStore_Indexes_byBeataZalewa_scripts
26th_Meetup_of_PLSSUG_WROCLAW-ColumnStore_Indexes_byBeataZalewa_scripts26th_Meetup_of_PLSSUG_WROCLAW-ColumnStore_Indexes_byBeataZalewa_scripts
26th_Meetup_of_PLSSUG_WROCLAW-ColumnStore_Indexes_byBeataZalewa_scripts
 
SQLDay2013_PawełPotasiński_GeografiaSQLServer2012
SQLDay2013_PawełPotasiński_GeografiaSQLServer2012SQLDay2013_PawełPotasiński_GeografiaSQLServer2012
SQLDay2013_PawełPotasiński_GeografiaSQLServer2012
 
38Spotkanie_PLSSUGweWroclawiu_Keynote
38Spotkanie_PLSSUGweWroclawiu_Keynote38Spotkanie_PLSSUGweWroclawiu_Keynote
38Spotkanie_PLSSUGweWroclawiu_Keynote
 
Sql day2015 fts
Sql day2015 ftsSql day2015 fts
Sql day2015 fts
 
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET DeveloperSQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
 
SQLDay2013_ChrisWebb_CubeDesign&PerformanceTuning
SQLDay2013_ChrisWebb_CubeDesign&PerformanceTuningSQLDay2013_ChrisWebb_CubeDesign&PerformanceTuning
SQLDay2013_ChrisWebb_CubeDesign&PerformanceTuning
 
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...
SQL DAY 2012 | DEV Track | Session 8 - Getting Dimension with Data by C.Tecta...
 
GoldenLine.pl - Od Startupu do... Startupu :-)
GoldenLine.pl - Od Startupu do... Startupu :-)GoldenLine.pl - Od Startupu do... Startupu :-)
GoldenLine.pl - Od Startupu do... Startupu :-)
 
Maintenance_Plans_Zupełnie_Znienacka
Maintenance_Plans_Zupełnie_ZnienackaMaintenance_Plans_Zupełnie_Znienacka
Maintenance_Plans_Zupełnie_Znienacka
 
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)
 
Śniadanie Daje Moc
Śniadanie Daje MocŚniadanie Daje Moc
Śniadanie Daje Moc
 

Similar to SQLDay2013_ChrisWebb_SSASDesignMistakes

[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...
[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...
[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...Insight Technology, Inc.
 
NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabasesAdi Challa
 
Agile Data Warehousing
Agile Data WarehousingAgile Data Warehousing
Agile Data WarehousingDavide Mauri
 
Schema less table & dynamic schema
Schema less table & dynamic schemaSchema less table & dynamic schema
Schema less table & dynamic schemaDavide Mauri
 
Challenges in Querying a Distributed Relational Database
Challenges in Querying a Distributed Relational DatabaseChallenges in Querying a Distributed Relational Database
Challenges in Querying a Distributed Relational DatabaseScaleBase
 
The Future of Database Development
The Future of Database DevelopmentThe Future of Database Development
The Future of Database DevelopmentSteve Jones
 
The Death of the Star Schema
The Death of the Star SchemaThe Death of the Star Schema
The Death of the Star SchemaDATAVERSITY
 
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site ReviewECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site ReviewKenny Buntinx
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systemselliando dias
 
Database continuous integration, unit test and functional test
Database continuous integration, unit test and functional testDatabase continuous integration, unit test and functional test
Database continuous integration, unit test and functional testHarry Zheng
 
Guided Interaction: Rethinking the Query-Result Paradigm
Guided Interaction: Rethinking the Query-Result ParadigmGuided Interaction: Rethinking the Query-Result Paradigm
Guided Interaction: Rethinking the Query-Result Paradigmarnabdotorg
 
11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL Developers11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL DevelopersIke Ellis
 
Roman Rehak: 24/7 Database Administration + Database Mail Unleashed
Roman Rehak: 24/7 Database Administration + Database Mail UnleashedRoman Rehak: 24/7 Database Administration + Database Mail Unleashed
Roman Rehak: 24/7 Database Administration + Database Mail UnleashedMSDEVMTL
 
Optimizing Browser Rendering
Optimizing Browser RenderingOptimizing Browser Rendering
Optimizing Browser Renderingmichael.labriola
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Guy Harrison
 
Geek Sync | Field Medic’s Guide to Database Mirroring
Geek Sync | Field Medic’s Guide to Database MirroringGeek Sync | Field Medic’s Guide to Database Mirroring
Geek Sync | Field Medic’s Guide to Database MirroringIDERA Software
 
Data Vault 2.0 Demystified: East Coast Tour
Data Vault 2.0 Demystified: East Coast TourData Vault 2.0 Demystified: East Coast Tour
Data Vault 2.0 Demystified: East Coast TourWhereScape
 
Dynamic sql for efficient searching
Dynamic sql for efficient searchingDynamic sql for efficient searching
Dynamic sql for efficient searchingdamienjoyce
 
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!ScaleBase
 

Similar to SQLDay2013_ChrisWebb_SSASDesignMistakes (20)

[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...
[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...
[db tech showcase Tokyo 2017] C16: Azure SQL Database - Are you ready for the...
 
NoSQLDatabases
NoSQLDatabasesNoSQLDatabases
NoSQLDatabases
 
Agile Data Warehousing
Agile Data WarehousingAgile Data Warehousing
Agile Data Warehousing
 
Schema less table & dynamic schema
Schema less table & dynamic schemaSchema less table & dynamic schema
Schema less table & dynamic schema
 
Challenges in Querying a Distributed Relational Database
Challenges in Querying a Distributed Relational DatabaseChallenges in Querying a Distributed Relational Database
Challenges in Querying a Distributed Relational Database
 
The Future of Database Development
The Future of Database DevelopmentThe Future of Database Development
The Future of Database Development
 
The Death of the Star Schema
The Death of the Star SchemaThe Death of the Star Schema
The Death of the Star Schema
 
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site ReviewECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
ECMDay2015 - Kent Agerlund – Configuration Manager 2012 – A Site Review
 
Storage Systems For Scalable systems
Storage Systems For Scalable systemsStorage Systems For Scalable systems
Storage Systems For Scalable systems
 
Database continuous integration, unit test and functional test
Database continuous integration, unit test and functional testDatabase continuous integration, unit test and functional test
Database continuous integration, unit test and functional test
 
Guided Interaction: Rethinking the Query-Result Paradigm
Guided Interaction: Rethinking the Query-Result ParadigmGuided Interaction: Rethinking the Query-Result Paradigm
Guided Interaction: Rethinking the Query-Result Paradigm
 
11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL Developers11 Goals of High Functioning SQL Developers
11 Goals of High Functioning SQL Developers
 
Roman Rehak: 24/7 Database Administration + Database Mail Unleashed
Roman Rehak: 24/7 Database Administration + Database Mail UnleashedRoman Rehak: 24/7 Database Administration + Database Mail Unleashed
Roman Rehak: 24/7 Database Administration + Database Mail Unleashed
 
Optimizing Browser Rendering
Optimizing Browser RenderingOptimizing Browser Rendering
Optimizing Browser Rendering
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)
 
Dbms fast track 3/3
Dbms fast track 3/3Dbms fast track 3/3
Dbms fast track 3/3
 
Geek Sync | Field Medic’s Guide to Database Mirroring
Geek Sync | Field Medic’s Guide to Database MirroringGeek Sync | Field Medic’s Guide to Database Mirroring
Geek Sync | Field Medic’s Guide to Database Mirroring
 
Data Vault 2.0 Demystified: East Coast Tour
Data Vault 2.0 Demystified: East Coast TourData Vault 2.0 Demystified: East Coast Tour
Data Vault 2.0 Demystified: East Coast Tour
 
Dynamic sql for efficient searching
Dynamic sql for efficient searchingDynamic sql for efficient searching
Dynamic sql for efficient searching
 
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
 

More from Polish SQL Server User Group

26th_Meetup_of_PLSSUG-ColumnStore_Indexes_byBeataZalewa_session
26th_Meetup_of_PLSSUG-ColumnStore_Indexes_byBeataZalewa_session26th_Meetup_of_PLSSUG-ColumnStore_Indexes_byBeataZalewa_session
26th_Meetup_of_PLSSUG-ColumnStore_Indexes_byBeataZalewa_sessionPolish SQL Server User Group
 
SQLDay2011_Sesja03_Fakty,MiaryISwiatRealny_GrzegorzStolecki
SQLDay2011_Sesja03_Fakty,MiaryISwiatRealny_GrzegorzStoleckiSQLDay2011_Sesja03_Fakty,MiaryISwiatRealny_GrzegorzStolecki
SQLDay2011_Sesja03_Fakty,MiaryISwiatRealny_GrzegorzStoleckiPolish SQL Server User Group
 
SQLDay2011_Sesja01_ModelowanieIZasilanieWymiarówHurtowniDanych_ŁukaszGrala
SQLDay2011_Sesja01_ModelowanieIZasilanieWymiarówHurtowniDanych_ŁukaszGralaSQLDay2011_Sesja01_ModelowanieIZasilanieWymiarówHurtowniDanych_ŁukaszGrala
SQLDay2011_Sesja01_ModelowanieIZasilanieWymiarówHurtowniDanych_ŁukaszGralaPolish SQL Server User Group
 
SQLDay2011_Sesja05_MicrosoftSQLServerExecutionPlansFromCompilationToCachingTo...
SQLDay2011_Sesja05_MicrosoftSQLServerExecutionPlansFromCompilationToCachingTo...SQLDay2011_Sesja05_MicrosoftSQLServerExecutionPlansFromCompilationToCachingTo...
SQLDay2011_Sesja05_MicrosoftSQLServerExecutionPlansFromCompilationToCachingTo...Polish SQL Server User Group
 
How to tune a database application without changing a single query - Maciej P...
How to tune a database application without changing a single query - Maciej P...How to tune a database application without changing a single query - Maciej P...
How to tune a database application without changing a single query - Maciej P...Polish SQL Server User Group
 
Co nowego w SQL Server 11 – Denali CTP1 - Grzegorz Stolecki, Łukasz Grala i K...
Co nowego w SQL Server 11 – Denali CTP1 - Grzegorz Stolecki, Łukasz Grala i K...Co nowego w SQL Server 11 – Denali CTP1 - Grzegorz Stolecki, Łukasz Grala i K...
Co nowego w SQL Server 11 – Denali CTP1 - Grzegorz Stolecki, Łukasz Grala i K...Polish SQL Server User Group
 
Master Data Services – Po co nam kolejna usługa w Sql Server - Mariusz Koprowski
Master Data Services – Po co nam kolejna usługa w Sql Server - Mariusz KoprowskiMaster Data Services – Po co nam kolejna usługa w Sql Server - Mariusz Koprowski
Master Data Services – Po co nam kolejna usługa w Sql Server - Mariusz KoprowskiPolish SQL Server User Group
 

More from Polish SQL Server User Group (8)

SQLDay2013_MarcinSzeliga_DataInDataMining
SQLDay2013_MarcinSzeliga_DataInDataMiningSQLDay2013_MarcinSzeliga_DataInDataMining
SQLDay2013_MarcinSzeliga_DataInDataMining
 
26th_Meetup_of_PLSSUG-ColumnStore_Indexes_byBeataZalewa_session
26th_Meetup_of_PLSSUG-ColumnStore_Indexes_byBeataZalewa_session26th_Meetup_of_PLSSUG-ColumnStore_Indexes_byBeataZalewa_session
26th_Meetup_of_PLSSUG-ColumnStore_Indexes_byBeataZalewa_session
 
SQLDay2011_Sesja03_Fakty,MiaryISwiatRealny_GrzegorzStolecki
SQLDay2011_Sesja03_Fakty,MiaryISwiatRealny_GrzegorzStoleckiSQLDay2011_Sesja03_Fakty,MiaryISwiatRealny_GrzegorzStolecki
SQLDay2011_Sesja03_Fakty,MiaryISwiatRealny_GrzegorzStolecki
 
SQLDay2011_Sesja01_ModelowanieIZasilanieWymiarówHurtowniDanych_ŁukaszGrala
SQLDay2011_Sesja01_ModelowanieIZasilanieWymiarówHurtowniDanych_ŁukaszGralaSQLDay2011_Sesja01_ModelowanieIZasilanieWymiarówHurtowniDanych_ŁukaszGrala
SQLDay2011_Sesja01_ModelowanieIZasilanieWymiarówHurtowniDanych_ŁukaszGrala
 
SQLDay2011_Sesja05_MicrosoftSQLServerExecutionPlansFromCompilationToCachingTo...
SQLDay2011_Sesja05_MicrosoftSQLServerExecutionPlansFromCompilationToCachingTo...SQLDay2011_Sesja05_MicrosoftSQLServerExecutionPlansFromCompilationToCachingTo...
SQLDay2011_Sesja05_MicrosoftSQLServerExecutionPlansFromCompilationToCachingTo...
 
How to tune a database application without changing a single query - Maciej P...
How to tune a database application without changing a single query - Maciej P...How to tune a database application without changing a single query - Maciej P...
How to tune a database application without changing a single query - Maciej P...
 
Co nowego w SQL Server 11 – Denali CTP1 - Grzegorz Stolecki, Łukasz Grala i K...
Co nowego w SQL Server 11 – Denali CTP1 - Grzegorz Stolecki, Łukasz Grala i K...Co nowego w SQL Server 11 – Denali CTP1 - Grzegorz Stolecki, Łukasz Grala i K...
Co nowego w SQL Server 11 – Denali CTP1 - Grzegorz Stolecki, Łukasz Grala i K...
 
Master Data Services – Po co nam kolejna usługa w Sql Server - Mariusz Koprowski
Master Data Services – Po co nam kolejna usługa w Sql Server - Mariusz KoprowskiMaster Data Services – Po co nam kolejna usługa w Sql Server - Mariusz Koprowski
Master Data Services – Po co nam kolejna usługa w Sql Server - Mariusz Koprowski
 

Recently uploaded

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 

Recently uploaded (20)

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 

SQLDay2013_ChrisWebb_SSASDesignMistakes

  • 1. NASI SPONSORZY I PARTNERZY
  • 2. (More) Common Analysis Services Multidimensional Design Mistakes and How to Avoid Them Chris Webb
  • 3. Who Am I? • Chris Webb • Email: chris@crossjoin.co.uk • Twitter @Technitrain • • Analysis Services consultant and trainer: www.crossjoin.co.uk & www.technitrain.com Co-author: • MDX Solutions • Expert Cube Development with SSAS 2008 • Analysis Services 2012: The BISM Tabular Model • • SQL Server MVP Blogger: http://cwebbbi.wordpress.com
  • 4. Agenda • • • • • • • • • Why good cube design is a Good Thing Using built-in best practices in BIDS Precon recap Parent/child pain MDX vs modelling Partition elimination Unused and/or unprocessed aggregations NON_EMPTY_BEHAVIOR Cell Security
  • 5. Why Good Design is Important! • As if you needed reasons…? • Good design = good performance = faster initial development = easy further development = simple maintenance • This is not an exhaustive list, but a selection of design problems and mistakes I’ve seen on consultancy engagements
  • 6. Best Practices in BIDS • Don’t ignore the blue squiggly lines in BIDS! – They sometimes make useful recommendations about what you’re doing • Actively dismissing them, with comments, is a useful addition to documentation • As always, official ‘best practices’ aren’t always best practices in all situations
  • 7. Common Design Mistakes • Three questions need to be asked: – What’s the problem? – What bad things will happen as a result? – What can I do to fix it (especially after I’ve gone into production)? • This is not a name-and-shame session!
  • 8. Stuff From My Precon • • • • Don’t use unfriendly names Don’t create unnecessary attributes Don’t do ETL in your DSV Don’t create many small cubes instead of one big one • Don’t create one big cube instead of many smaller ones SQLDay 2013
  • 9. Problem: Parent Child Hierarchies • Parent Child hierarchies are the only way to model hierarchies where you don’t know the number of levels in advance • They are also very flexible, leading some people to use them more often than they should
  • 10. Consequences: Parent Child • Parent Child hierarchies can lead to slow query performance – No aggregations can be built at levels inside the hierarchy – Slow anyway • They can also be a nightmare for – Scoping advanced MDX calculations – Dimension security
  • 11. Fix: Parent Child • If you know, or can assume, the maximum depth of your hierarchy, there’s an alternative • Normal user hierarchies can be made ‘Ragged’ with the HideMemberIf property – Hides members if their parent has no name, or the same name as them • Still has performance issues, but less than parent/child • You can use the BIDS Helper “parent/child naturaliser” to convert the underlying relational table to a level-based structure
  • 12. Problem: Over-reliance on MDX • As with the DSV, it can be tempting to use MDX calculations instead of making structural changes to cubes and dimensions • A simple example is to create a ‘grouping’ calculated member instead of creating a new attribute • Other examples include pivoting measures into a dimension, or doing m2m in MDX
  • 13. Consequences: Over-reliance on MDX • MDX should always be your last resort: • Pure MDX calculations are always going to be the slowest option for query performance • They are also the least-easily maintainable part of a cube • The more complex calculations you have, the more difficult it is to make other calculations work
  • 14. Fix: Over-reliance on MDX • Redesigning your cube is a radical option but can pay big dividends in terms of performance • Risks breaking existing reports and queries but your users may be ok with this to get more speed
  • 15. Problem: Partition Elimination • SSAS will usually only query the partitions that contain the data it needs • This depends on the way it stores the minimum and maximum values of DataIDs (internal keys) in each partition SQLDay 2013
  • 16. Consequences: Partition Elimination • Slow performance – if SSAS queries too many partitions for a single query • Although the extra cache might make future queries faster… SQLDay 2013
  • 17. Fix: Partition Elimination • • • • Rewrite your MDX Set the slice property Order your members by DataID if possible Use the connection string properties Disable Prefetch Cache=True; Cache Ratio=1 SQLDay 2013
  • 18. Problem: Unused Aggregations • Aggregations are the most important SSAS feature for performance • Most people know they need to build some and run the Aggregation Design Wizard… • …but don’t know whether they’re being used or not
  • 19. Consequences: Unused Aggregations • Slow queries! • If you haven’t built the right aggregations, then your queries won’t get any performance benefit • You’ll waste time processing these aggregations, and waste disk space storing them
  • 20. Fix: Unused Aggregations • Design some aggregations! • Rerun the Aggregation Design Wizard and set the Aggregation Usage property appropriately • Perform Usage-Based Optimisation • Design aggregations manually for queries that are still slow and could benefit from aggregations
  • 21. Problem: Unprocessed Aggregations • Even if you’ve designed aggregations that are useful for your queries, you need to ensure they’re processed • Running a Process Update on a dimension will drop some or all Flexible aggregations (depends on which version of SSAS)
  • 23. Fix: Unprocessed Aggregations • Run a Process Default or a Process Index on your cube after you have run a Process Update on any dimensions • Note that this will result in: – Longer processing times overall – More disk space used • But it will at least mean that your queries run faster
  • 24. Problem: Non_Empty_Behavior • The Non_Empty_Behavior property was introduced in SSAS 2000 as a performance hint • It was very important in SSAS 2000/2005 • It says: If Regular Measure A is Null Then Calculated Measure B will be Null • But it is usually set incorrectly • And from SSAS 2008 on it is mostly unnecessary SQLDay 2013
  • 25. Consequences: Non_Empty_Behavior • Setting Non_Empty_Behavior incorrectly can – At best, make no difference to your performance – At worst, result in incorrect query results SQLDay 2013
  • 26. Fix: Non_Empty_Behavior • Don’t set it! • Rewrite your calculations to check for null values: IIF( ISEMPTY(MEASURES.A), NULL, <CALCULATION> ) SQLDay 2013
  • 27. Problem: Cell Security • Cell security allows you to secure individual cells in a cube • At first sight, it is the only option: it does things dimension security cannot do… SQLDay 2013
  • 28. Consequences: Cell Security • Setting cell security correctly can be very difficult • Read and read contingent cell security can be even more confusing • Performance is often very bad with cell security: – Forces cell-by-cell mode – Forces Formula Engine caching to query scope SQLDay 2013
  • 29. Fix: Cell Security • The answer is to use Dimension Security instead • But how…? • Create a new dimension that contains the combinations of members that you want to secure • Then use Dimension Security on it • Doesn’t work if you need to secure measures  SQLDay 2013
  • 31. NASI SPONSORZY I PARTNERZY Organizacja: Polskie Stowarzyszenie Użytkowników SQL Server - PLSSUG Produkcja: DATA MASTER Maciej Pilecki