Introduction to Analysis Services and OLAP Technology Tom Conlon and Rob Zare Program Managers SQL Server Business Intelligence Unit Microsoft Corp.
Topics What is OLAP? What is OLAP? 3 Why’s of OLAP 3 Why’s of OLAP Performance case study Performance case study Architecture summary Architecture summary Lots of demos! Lots of demos! – Excel – Office web component – Microsoft data analyzer – Building a cube with Analysis Manager
The First Database
The First Data Warehouse
The First DBA
OLTP Versus Data Warehousing OLTP supports OLTP supports – Granular transactions – Real time production systems – Current, changing data Data warehousing supports Data warehousing supports – Summarized queries – Consistent, heterogeneous data – Voluminous, historical, stable data OperatingBusinessManaging Business Business
What is OLAP? On Line Analytical Processing On Line Analytical Processing OLAP is FASMI OLAP is FASMI – F ast – A nalysis – S hared – M ultidimensional – I nformation
The 3 Why’s of OLAP Intuitive Metadata model for business users Intuitive Metadata model for business users – Just show them the data, and very quickly they ‘just get it’. Fast queries Fast queries – Orders of magnitude improvement over relational. – Can completely change usability of system Dedicated Language for Analysis and Modeling (MDX) Dedicated Language for Analysis and Modeling (MDX) – Built-in functions for handling time and group comparisons
OLAP Brief history 1970s Multidimensional database 1970s Multidimensional database – Boutique industry of specialists – Very expensive, rare deployment – Considered very “advanced” 1980s EIS 1980s EIS – Very simple UI – Still expensive, uncommon, tailored for a few users 1989 – named OLAP by E. F. Codd 1989 – named OLAP by E. F. Codd
OLAP in the 90s – Key Changes Orders of magnitude decline in disk storage prices Orders of magnitude decline in disk storage prices Internet and intranet is ubiquitous Internet and intranet is ubiquitous Key changes in corporate culture Key changes in corporate culture – ‘Analysts’ at all levels in corporation – Give decision makers direct access to data, cannot wait for IT to deliver a canned report 1998 – Microsoft Analysis Services 1998 – Microsoft Analysis Services – OLEDB for OLAP Standard
OLAP Architectures Multidimensional view of data Multidimensional view of data MOLAP, ROLAP, HOLAP MOLAP, ROLAP, HOLAP
Why #1: Intuitive Metadata FASMI
OLAP Objects Cubes Cubes Dimensions Dimensions Hierarchies Hierarchies Levels Levels Measures Measures Members Members Properties Properties
Product PeasCornBread MilkBeer Market Bos NYC Chi Sea Jan Mar Feb Time Units of beer sold in Boston in January Cube
Dimensions Edges of a cube Edges of a cube Usually entities familiar to the end user Usually entities familiar to the end user – Customer, product, time, etc Typically 5 to 10 per cube, but sometimes in the 10’s or even more Typically 5 to 10 per cube, but sometimes in the 10’s or even more Hierarchical Hierarchical – E.g. Year/month/day, Country/State/City
Hierarchies & Levels USA USA – WA Seattle Seattle – Tom Conlon Tom Conlon – Quarter1 February February – February20 Country State City Zip Customer Year Quarter Month Day
Measures “Quantities” stored in the cells of cubes “Quantities” stored in the cells of cubes Generally numeric, but not always Generally numeric, but not always Examples: Examples: – Units sold – Price
OLAP puts Data In The Hands Of Users End user analysis activities Pivoting Pivoting – Swapping page/row/column layout Slicing Slicing – Select specific dimension members on an axis Drilldown Drilldown – Navigate from summary to detail data Drill through Drill through – Retrieve granular data from Fact Table Calculations Calculations – Adding derived dimension members or measures Visualization Visualization – Charting, mapping, etc.
Microsoft Office demo demo Excel and Office Web Component Microsoft Data Analyzer
Why #2: OLAP is Fast FASMI Why is OLAP Fast? Why is OLAP Fast? Case Study Case Study
Aggregations – The Magic Behind OLAP Performance Calculate ahead of time the results of the aggregate cells Calculate ahead of time the results of the aggregate cells – Avoid scanning the detailed data during user interaction – Gain constant response time to queries independent of DB size or logic complexity
Data Explosion Syndrome Number of Dimensions Number of Aggregations OLAP Problem: Data Explosion (4 levels in each dimension)
Aggregation Design Fact Table Highest level of aggregation Most detailed Aggregations Show me all sales for all products for all...
Aggregation Design Fact Table Highest level of aggregation Show me all sales for all products for all...
Aggregation Design Fact Table MonthProducts Quarter Pro. Family QuarterProduct Month
Using Analysis Manager to Design a Cube demo demo
T3 - Data Overview Expanded version of a real production database Expanded version of a real production database Dimensions Dimensions – Market (80 Markets) – Period (268 Weeks, 67 Months, 5 Years) – Product (710,000 Products, 130,000 Brands, 1000 Classes, 500 Subgroups, 100 Groups, 9 Departments) Eight fact tables: different levels of aggregation Eight fact tables: different levels of aggregation – Therefore eight cubes, joined into one Virtual Cube – Exactly the tables used by production system today Partitioning by months Partitioning by months
Storage Requirements 39%
Performance Processing Processing – 7.7 billion rows, 50 hours – 153 million rows/hr – 42K rows/sec – 60-70% CPU utilization Querying Querying – 50-user workload, 1350 queries, 30-sec think time – Cold cache – Median response 0.08 sec, mean 1.2 sec – Low CPU load - we didn’t have enough queries! – You’ve got to experience this to appreciate it!
Why #3: MDX Language for Analysis FASMI
What is MDX MDX = Multi Dimensional Expressions MDX = Multi Dimensional Expressions A syntax for modeling and querying an OLAP database A syntax for modeling and querying an OLAP database Part of the OLE DB for OLAP Spec Part of the OLE DB for OLAP Spec Supported by multiple providers (OLAP Services, TM1, SAS, WhiteLight, SAP…) Supported by multiple providers (OLAP Services, TM1, SAS, WhiteLight, SAP…) It is the key for all advanced analytical capabilities of OLAP Services. It is the key for all advanced analytical capabilities of OLAP Services.
Typical MDX Expressions Modeled after SQL Modeled after SQLSelect {[Measures].[Store Sales],[Measures].[Unit Sales]} on 0 from Sales from Sales where ([Time].[1997], [Customers].[USA])
Typical MDX Expressions Share of Total Share of Total[Sales]/(Sales,Product.CurrentMember.Parent) Sales growth from the same period last year: Sales growth from the same period last year: ([Sales], [Time].CurrentMember) – ([Sales], ParallelPeriod([Year], 1) 3 Periods moving average 3 Periods moving average Avg( Time.CurrentMember.Lag(2): Time.CurrentMember, Measures.Inventory ) YTD sales: YTD sales: Sum( YTD(Time.CurrentMember), [Sales] )
Security in OLAP Cubes
Security Integrated NT security Integrated NT security Roles: groups of NT accounts with the same privileges Roles: groups of NT accounts with the same privileges Database Role Database Role – Defines the list of users Cube Role Cube Role – Cube access: Read, Write – Cell security: Read, Write, Contingent Read
Heterogeneous coordinates system
Summary OLAP is about empowering analysts within the corp with direct access to data OLAP is about empowering analysts within the corp with direct access to data Intuitive business UI Intuitive business UI – Drill down, up, through, across – Slice and dice, Formatting and graphics FAST response time FAST response time Multidimensional Expression Language (MDX) for queries Multidimensional Expression Language (MDX) for queries Rapid adoption in 90s and beyond Rapid adoption in 90s and beyond
Architecture – Single Server OLAPStore Application ADO MD PivotTable Service OLEDB for OLAP AnalysisServer AnalysisManager DSO SQL Server DataWarehouse Other OLE DB Providers OLEDB CLIENT SERVER
Client Access Architecture OLAP Server Pivot Table Service (OLEDB for (OLEDB forOLAP) ADOMD VB VBA C++ Excel Office Web Component
Don’t forget to complete the on-line Session Feedback form on the Attendee Web site
© 2002 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.