Introduction To SQL Server Analysis Services 2008 Olap: by Kristin Ferrier
Introduction To SQL Server Analysis Services 2008 Olap: by Kristin Ferrier
Services 2008
OLAP
by Kristin Ferrier
Transactional Databases
• Stored in relational database engines
• Data is typically in normalized form
• Optimized for insert, update, and deletion
operations
• Typically used by business applications
OLAP Cubes
• Online Analytic Processing (OLAP)
• Optimized for complex analytics and
reporting
• Data lives in multidimensional structures
• Allow answer questions like
o What were my sales revenue by product, by
store, and sales date?
What is SSAS OLAP?
• Microsoft’s Online Analytic Processing
(OLAP) tool
• Started with MS SQL Server 7.0
• Queried using MDX
Microsoft BI Example
Implementation
Star Schema
SSAS Versions
• SSAS started with version 7.0 when MS
bought Panorama’s OLAP engine
• SSAS 2000 <> SSAS 2005
• SSAS 2005 similar to SSAS 2008
SSAS Development Tools
• Business Intelligence Development Studio
(BIDS)
• BIDSHelper (add-in from Codeplex)
MDX
• Multidimensional Expressions
• A query language for OLAP databases
• Developed by SQL Server engineers
• Now accepted by most major OLAP
vendors, including:
o Microsoft
o Cognos
o Hyperion
o Business Objects
MDX Popular Books
• Fast Track to MDX (for SQL Server 2000)
Second Edition by Whitehorn, Zare, and
Pasumansky
• MDX Solutions: With Microsoft SQL
Server Analysis Services 2005 and
Hyperion Essbase by Spofford, Harinath,
Webb, and Hai Huang
SSAS 2008 Datasources
• SQL Server (7.0 – 2008)
• Oracle 9.0
• IBM DB2 8.1
• Teradata v2R6
• MS Access
• Note: Certain sources are only accepted by certain
levels of SSAS 2008
Data Source Views
• Abstraction layer
• Logical data model of one or more data
sources
• Primarily includes tables, named queries,
relationships, and named calculations.
Dimensions
• Business entities by which you want to
analyze your measures
• In question, what is my sales revenue by
Sales Date, Employee, and Product?
o Sales Date, Employee, and Product are the
dimensions
Measures
• The data being analyzed
• In question, what are my Sales Revenue
and Quantity Sold by Sales Date,
Employee, and Product?
o Sales Revenue and Quantity Sold are both
measures
• Measures of the same granularity exist in
the same measure group
Cube Storage Modes
• Cubes have up to 3 logical storage layers
o Metadata
o Aggregations (optional)
o Data
• There are three storage modes
o MOLAP
o HOLAP
o ROLAP
Cube Storage Modes cont.
• MOLAP
o Metadata, Aggregations, and Data all live on SSAS server
o Considered fastest for query time
• HOLAP (rarely used)
o Metadata and Aggregations live on SSAS Server
o Data lives in relational database
• ROLAP
o Metadata lives on SSAS server
o Data and aggregations live in relational database
o Relational tables are created to hold the aggregations
o Low latency
Demo
Sales Cube
Processing
• Processing is how data is brought in from
relational data sources to the SSAS cube
• Executed using XMLA
• Many places from which to execute
XMLA:
o SSMS
o Visual Studio 2008
o SSIS Package
o SQL Server Agent
o Command Line
Processing Types
• Process Full – Can be applied to any SSAS object.
Complete reprocess. Process Full is needed if
metadata changes.
• Process Update – For dimensions only. Applies
member updates, insertions, and deletions without
invalidating the cubes using the dimension.
• Process Add – Adds new data only. Applies to
dimensions and partitions.
• Process Data – Loads the object’s data only. Does
not build indexes or aggregations.
• Process Index – Builds indexes and aggregations on
data already there. Applies to dimensions, cubes,
measure groups, and partitions.
Partitioning
• Improved Query Performance
• Improved Processing Performance
Partitioning cont.
• Recommended partition size of 10 – 20
million rows
• Example: A year of sales contains 15
million records.
• If partition by year, queries by time will
only scan the partition(s) with data for the
time range of the query.
• Processing can be done only against the
partitions receiving new data.
My Favorite SSAS Blogs
• Chris Webb -
http://cwebbbi.spaces.live.com
• Mosha Pasumansky -
http://sqlblog.com/blogs/mosha
Contact Me
• [email protected]
• http://kferrier.blogspot.com/