SlideShare a Scribd company logo
1 of 19
BI with xVelocity
xVelocity In Memory Analytics

Curtis Smith
Principal Lead Consultant, Southern Region
Magenic Technologies
xVelocity - Agenda
• What is xVelocity
• What do expect when using xVelocity.
• What makes xVelocity fast?
  – Columnstore
• Demo of creating a Columnstore Index
• Take a look at Pivot View Reports
xVelocity – History.
• xVelocity In-Memory Analytics Engine –referenced as xVelocity by
  Microsoft.
• xVelocity replaces the VertiPaq engine.
  – What is VertiPaq?
     • Used with PowerPoint, best thought of a local analysis services.
xVelocity – How do I get it?
• Installed with SQL 2012 Analysis Services.
• Installed / enabled with tabular mode.
  – Not available with Analysis Services Multidimensional.
     • Again, you must chose tabular mode as Multidimensional is the default.
xVelocity – What can I expect?
• Microsoft has tested performance improvements ranging from 10 - 100x.
• Get data to your users faster.
• Use existing hardware, with exceptions.
  – More preformat hardware will yield better performance.
  – Very memory dependent.
xVelocity – What makes it fast?
• Analysis is done in memory.
• Uses the Columnstore technology.
  – Columnstore? What’s a Columnstore?
• Advanced query execution technology processes chunks of columns in
  batches.
• Makes the largest impact on tables with millions/billions of rows.
xVelocity - Columnstore
• Columnstore index is a new type of index
• Data is stored differently from traditional indexes
  – Columnstore stored all columns together on the same page
  – Traditional indexes
       Data Value1   Data Value2   Data Value3   DataValue4

       Data Value1   Data Value2   Data Value3   DataValue4

       Data Value1   Data Value2   Data Value3   DataValue4
xVelocity - Columnstore
• Columnstore index
      Data Value1   Data Value2   Data Value3    Data Value4

      Data Value1   Data Value2   Data Value3    Data Value4

      Data Value1   Data Value2   Data Value3    Data Value4

      Data Value1   Data Value2   Data Value3    Data Value4


• Only needed columns are read from disk
• Data is typically compressed with better ratio
  – Provides better hit ratio with cached data
xVelocity – Columnstore continued…
• Created using the “COLUMNSTORE” keyword
  – CREATE COLUMNSTORE INDEX IndexName on TableName
• Normally created using all columns of supported type for Columnstore
• Query Optimizer choose when to use the column store index
• Tables become READ-ONLY, however there are methods of updating
  tables that have utilize Columnstore indexing
  – Drop the index and rebuild after inserting the data
  – Switch the partition
xVelocity – Columnstore continued…
• Only one Columnstore index per table
• Columnstore indexes on partitioned tables must be partition-aligned.
• Building of Columnstore indexes, may require longer to build.
• Must be non-clustered
• More information may be found at:
  • SQL Server Columnstore Index FAQ:
    http://social.technet.microsoft.com/wiki/contents/articles/3540.sql-server-
    columnstore-index-faq-en-us.aspx
xVelocity - Demo
• Create ColumnStore index


• Execution mode row vs. batch
  – Test table with approximately 10 million rows


• Update of column store table
xVelocity – Where can I find more?
• MSDN:
 – xVelocity in SQL Server 2012
    • http://msdn.microsoft.com/en-us/library/hh922900.aspx
 – Columnstore Indexes
    • http://msdn.microsoft.com/en-us/library/gg492088.aspx#Described
xVelocity – more info continued …
• SQLBI.com has a very good comparison between VertiPaq and
  Columnstore
  – http://www.sqlbi.com/wp-content/uploads/Vertipaq-vs-
    ColumnStore1.pdf
• Microsoft-led benchmark testing datasheet:
  – http://download.microsoft.com/download/7/2/E/72E63D2D-9F73-
    42BB-890F-
    C1CA0931511C/SQL_Server_2012_xVelocityBenchmark_DatasheetMa
    r2012.pdf
xVelocity – more info continued
• SQL Server Columnstore Index FAQ
  – http://social.technet.microsoft.com/wiki/contents/articles/3540.sql-
    server-columnstore-index-faq-en-us.aspx
• SQL Server 2012 Columnstore Index In Depth Part 1: Make a bigger
  AdventureworksDW database for Testing – Steven Wang
  – http://www.msbicoe.com/post/2012/04/12/xVelocity-Memory-
    Optimized-Columnstore-index-In-Depth-Part-1-Make-a-bigger-
    AdventureworksDW-database-for-Testing.aspx
xVelocity – more info continued
• SQL Server 2012 Columnstore Index In Depth Part 2: Columnstore Index
  Physical Data and Size Calculation - Steven Wang
  – http://www.msbicoe.com/post/2012/04/20/SQL-Server-2012-
    Columnstore-Index-In-Depth-Part-2-Columnstore-Index-Size-
    Calculation.aspx
xVelocity – Online Demo(s)
• http://blogs.msdn.com/b/oneclickbi/archive/2011/12/27/more-demos-
  of-power-view-available.aspx
xVelocity – Speaker info
• Curtis Smith
  – Principal Lead Consultant, Southern Region, Magenic
     • Working with SQL Server technologies for over 18 years.
     • Full life-cycle application development, database architecture, BI reporting.
     • Former Director of Software Development for a major home health agency.
  – Curtiss@magenic.com
• http://www.magenic.com

• Questions?
xVelocity – Example(s) Create COLUMNSTORE INDEX
•   /* *************************************************** */
•   -- create a temp table to demo updating of table with column store index.
•   /* *************************************************** */
•   if( OBJECT_ID('SomeTable') IS NOT NULL )
•   drop table SomeTable
•   go

•   create table SomeTable
•   (
•   StateAbbrchar(2)not null
•   PRIMARY KEY CLUSTERED
•   , StateNamevarchar(30)not null
•   , ANotevarchar(100)null
•   )
•   go

•   /* *************************************************** */
•   -- insert some test data
•   /* *************************************************** */
•   insert into SomeTable( StateAbbr, StateName ) VALUES ( 'GA', 'Georgia' )
•   insert into SomeTable( StateAbbr, StateName ) VALUES ( 'MN', 'Minnesota' )

•   /* *************************************************** */
•   -- update the table, this is allowed
•   /* *************************************************** */
•   UPDATE SomeTable SET
•   ANote = 'I thought it would be cold.'
•   where StateAbbr = 'MN'
xVelocity – Examples (1) Create COLUMNSTORE INDEX continued …
•   select * from SomeTable

•   -- create columnstore index
•   CREATE NONCLUSTERED COLUMNSTORE INDEX [NonClusteredColumnStoreIndex-TEST] ON [dbo].[SomeTable]
•   (
•   [StateAbbr],
•   [StateName],
•   [ANote]
•   )WITH (DROP_EXISTING = OFF) ON [PRIMARY]


•   -- try to update again
•   -- this is not allowed, while the table has an active columnstore index
•   UPDATE SomeTable SET
•   ANote = 'The weather was nice.'
•   where StateAbbr = 'MN'

•   select * from SomeTable

•   -- disable the index
•   ALTER INDEX [NonClusteredColumnStoreIndex-TEST] ON [dbo].[SomeTable] DISABLE
•   GO

•   -- reenable the index
•   ALTER INDEX [NonClusteredColumnStoreIndex-TEST] ON [dbo].[SomeTable] REBUILD
•   GO

More Related Content

More from Code Mastery

Building a SSAS Tabular Model Database
Building a SSAS Tabular Model DatabaseBuilding a SSAS Tabular Model Database
Building a SSAS Tabular Model DatabaseCode Mastery
 
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...Designer and Developer Collaboration with Visual Studio 2012 and Expression B...
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...Code Mastery
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practicesCode Mastery
 
Keynote Rockford Lhotka on the Microsoft Development Platftorm
Keynote   Rockford Lhotka on the Microsoft Development PlatftormKeynote   Rockford Lhotka on the Microsoft Development Platftorm
Keynote Rockford Lhotka on the Microsoft Development PlatftormCode Mastery
 
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...Code Mastery
 
Session 3c The SF SaaS Framework
Session 3c  The SF SaaS FrameworkSession 3c  The SF SaaS Framework
Session 3c The SF SaaS FrameworkCode Mastery
 
Session 3b The SF SaaS Framework
Session 3b   The SF SaaS FrameworkSession 3b   The SF SaaS Framework
Session 3b The SF SaaS FrameworkCode Mastery
 
Session 3a The SF SaaS Framework
Session 3a  The SF SaaS FrameworkSession 3a  The SF SaaS Framework
Session 3a The SF SaaS FrameworkCode Mastery
 
Session 2 Integrating SharePoint 2010 and Windows Azure
Session 2   Integrating SharePoint 2010 and Windows AzureSession 2   Integrating SharePoint 2010 and Windows Azure
Session 2 Integrating SharePoint 2010 and Windows AzureCode Mastery
 
Session 1 IaaS, PaaS, SaaS Overview
Session 1   IaaS, PaaS, SaaS OverviewSession 1   IaaS, PaaS, SaaS Overview
Session 1 IaaS, PaaS, SaaS OverviewCode Mastery
 
Loading a data warehouse using ssis 2012
Loading a data warehouse using ssis 2012Loading a data warehouse using ssis 2012
Loading a data warehouse using ssis 2012Code Mastery
 
Data Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingData Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingCode Mastery
 
Creating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis ServicesCreating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis ServicesCode Mastery
 
Preparing for Windows 8 and Metro
Preparing for Windows 8 and MetroPreparing for Windows 8 and Metro
Preparing for Windows 8 and MetroCode Mastery
 
Extending Your Reach using the Cloud and Mobile Devices
Extending Your Reach using the Cloud and Mobile DevicesExtending Your Reach using the Cloud and Mobile Devices
Extending Your Reach using the Cloud and Mobile DevicesCode Mastery
 
Creating Tomorrow’s Web Applications Using Today’s Technologies
Creating Tomorrow’s Web Applications Using Today’s Technologies Creating Tomorrow’s Web Applications Using Today’s Technologies
Creating Tomorrow’s Web Applications Using Today’s Technologies Code Mastery
 
Session 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFSession 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFCode Mastery
 

More from Code Mastery (17)

Building a SSAS Tabular Model Database
Building a SSAS Tabular Model DatabaseBuilding a SSAS Tabular Model Database
Building a SSAS Tabular Model Database
 
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...Designer and Developer Collaboration with Visual Studio 2012 and Expression B...
Designer and Developer Collaboration with Visual Studio 2012 and Expression B...
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
 
Keynote Rockford Lhotka on the Microsoft Development Platftorm
Keynote   Rockford Lhotka on the Microsoft Development PlatftormKeynote   Rockford Lhotka on the Microsoft Development Platftorm
Keynote Rockford Lhotka on the Microsoft Development Platftorm
 
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...
Session 5 Systems Integration Architectures: BizTalk VS Windows Workflow Foun...
 
Session 3c The SF SaaS Framework
Session 3c  The SF SaaS FrameworkSession 3c  The SF SaaS Framework
Session 3c The SF SaaS Framework
 
Session 3b The SF SaaS Framework
Session 3b   The SF SaaS FrameworkSession 3b   The SF SaaS Framework
Session 3b The SF SaaS Framework
 
Session 3a The SF SaaS Framework
Session 3a  The SF SaaS FrameworkSession 3a  The SF SaaS Framework
Session 3a The SF SaaS Framework
 
Session 2 Integrating SharePoint 2010 and Windows Azure
Session 2   Integrating SharePoint 2010 and Windows AzureSession 2   Integrating SharePoint 2010 and Windows Azure
Session 2 Integrating SharePoint 2010 and Windows Azure
 
Session 1 IaaS, PaaS, SaaS Overview
Session 1   IaaS, PaaS, SaaS OverviewSession 1   IaaS, PaaS, SaaS Overview
Session 1 IaaS, PaaS, SaaS Overview
 
Loading a data warehouse using ssis 2012
Loading a data warehouse using ssis 2012Loading a data warehouse using ssis 2012
Loading a data warehouse using ssis 2012
 
Data Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional ModelingData Warehouse Design & Dimensional Modeling
Data Warehouse Design & Dimensional Modeling
 
Creating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis ServicesCreating a Tabular Model Using SQL Server 2012 Analysis Services
Creating a Tabular Model Using SQL Server 2012 Analysis Services
 
Preparing for Windows 8 and Metro
Preparing for Windows 8 and MetroPreparing for Windows 8 and Metro
Preparing for Windows 8 and Metro
 
Extending Your Reach using the Cloud and Mobile Devices
Extending Your Reach using the Cloud and Mobile DevicesExtending Your Reach using the Cloud and Mobile Devices
Extending Your Reach using the Cloud and Mobile Devices
 
Creating Tomorrow’s Web Applications Using Today’s Technologies
Creating Tomorrow’s Web Applications Using Today’s Technologies Creating Tomorrow’s Web Applications Using Today’s Technologies
Creating Tomorrow’s Web Applications Using Today’s Technologies
 
Session 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFSession 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCF
 

BI With X Velocity

  • 1. BI with xVelocity xVelocity In Memory Analytics Curtis Smith Principal Lead Consultant, Southern Region Magenic Technologies
  • 2. xVelocity - Agenda • What is xVelocity • What do expect when using xVelocity. • What makes xVelocity fast? – Columnstore • Demo of creating a Columnstore Index • Take a look at Pivot View Reports
  • 3. xVelocity – History. • xVelocity In-Memory Analytics Engine –referenced as xVelocity by Microsoft. • xVelocity replaces the VertiPaq engine. – What is VertiPaq? • Used with PowerPoint, best thought of a local analysis services.
  • 4. xVelocity – How do I get it? • Installed with SQL 2012 Analysis Services. • Installed / enabled with tabular mode. – Not available with Analysis Services Multidimensional. • Again, you must chose tabular mode as Multidimensional is the default.
  • 5. xVelocity – What can I expect? • Microsoft has tested performance improvements ranging from 10 - 100x. • Get data to your users faster. • Use existing hardware, with exceptions. – More preformat hardware will yield better performance. – Very memory dependent.
  • 6. xVelocity – What makes it fast? • Analysis is done in memory. • Uses the Columnstore technology. – Columnstore? What’s a Columnstore? • Advanced query execution technology processes chunks of columns in batches. • Makes the largest impact on tables with millions/billions of rows.
  • 7. xVelocity - Columnstore • Columnstore index is a new type of index • Data is stored differently from traditional indexes – Columnstore stored all columns together on the same page – Traditional indexes Data Value1 Data Value2 Data Value3 DataValue4 Data Value1 Data Value2 Data Value3 DataValue4 Data Value1 Data Value2 Data Value3 DataValue4
  • 8. xVelocity - Columnstore • Columnstore index Data Value1 Data Value2 Data Value3 Data Value4 Data Value1 Data Value2 Data Value3 Data Value4 Data Value1 Data Value2 Data Value3 Data Value4 Data Value1 Data Value2 Data Value3 Data Value4 • Only needed columns are read from disk • Data is typically compressed with better ratio – Provides better hit ratio with cached data
  • 9. xVelocity – Columnstore continued… • Created using the “COLUMNSTORE” keyword – CREATE COLUMNSTORE INDEX IndexName on TableName • Normally created using all columns of supported type for Columnstore • Query Optimizer choose when to use the column store index • Tables become READ-ONLY, however there are methods of updating tables that have utilize Columnstore indexing – Drop the index and rebuild after inserting the data – Switch the partition
  • 10. xVelocity – Columnstore continued… • Only one Columnstore index per table • Columnstore indexes on partitioned tables must be partition-aligned. • Building of Columnstore indexes, may require longer to build. • Must be non-clustered • More information may be found at: • SQL Server Columnstore Index FAQ: http://social.technet.microsoft.com/wiki/contents/articles/3540.sql-server- columnstore-index-faq-en-us.aspx
  • 11. xVelocity - Demo • Create ColumnStore index • Execution mode row vs. batch – Test table with approximately 10 million rows • Update of column store table
  • 12. xVelocity – Where can I find more? • MSDN: – xVelocity in SQL Server 2012 • http://msdn.microsoft.com/en-us/library/hh922900.aspx – Columnstore Indexes • http://msdn.microsoft.com/en-us/library/gg492088.aspx#Described
  • 13. xVelocity – more info continued … • SQLBI.com has a very good comparison between VertiPaq and Columnstore – http://www.sqlbi.com/wp-content/uploads/Vertipaq-vs- ColumnStore1.pdf • Microsoft-led benchmark testing datasheet: – http://download.microsoft.com/download/7/2/E/72E63D2D-9F73- 42BB-890F- C1CA0931511C/SQL_Server_2012_xVelocityBenchmark_DatasheetMa r2012.pdf
  • 14. xVelocity – more info continued • SQL Server Columnstore Index FAQ – http://social.technet.microsoft.com/wiki/contents/articles/3540.sql- server-columnstore-index-faq-en-us.aspx • SQL Server 2012 Columnstore Index In Depth Part 1: Make a bigger AdventureworksDW database for Testing – Steven Wang – http://www.msbicoe.com/post/2012/04/12/xVelocity-Memory- Optimized-Columnstore-index-In-Depth-Part-1-Make-a-bigger- AdventureworksDW-database-for-Testing.aspx
  • 15. xVelocity – more info continued • SQL Server 2012 Columnstore Index In Depth Part 2: Columnstore Index Physical Data and Size Calculation - Steven Wang – http://www.msbicoe.com/post/2012/04/20/SQL-Server-2012- Columnstore-Index-In-Depth-Part-2-Columnstore-Index-Size- Calculation.aspx
  • 16. xVelocity – Online Demo(s) • http://blogs.msdn.com/b/oneclickbi/archive/2011/12/27/more-demos- of-power-view-available.aspx
  • 17. xVelocity – Speaker info • Curtis Smith – Principal Lead Consultant, Southern Region, Magenic • Working with SQL Server technologies for over 18 years. • Full life-cycle application development, database architecture, BI reporting. • Former Director of Software Development for a major home health agency. – Curtiss@magenic.com • http://www.magenic.com • Questions?
  • 18. xVelocity – Example(s) Create COLUMNSTORE INDEX • /* *************************************************** */ • -- create a temp table to demo updating of table with column store index. • /* *************************************************** */ • if( OBJECT_ID('SomeTable') IS NOT NULL ) • drop table SomeTable • go • create table SomeTable • ( • StateAbbrchar(2)not null • PRIMARY KEY CLUSTERED • , StateNamevarchar(30)not null • , ANotevarchar(100)null • ) • go • /* *************************************************** */ • -- insert some test data • /* *************************************************** */ • insert into SomeTable( StateAbbr, StateName ) VALUES ( 'GA', 'Georgia' ) • insert into SomeTable( StateAbbr, StateName ) VALUES ( 'MN', 'Minnesota' ) • /* *************************************************** */ • -- update the table, this is allowed • /* *************************************************** */ • UPDATE SomeTable SET • ANote = 'I thought it would be cold.' • where StateAbbr = 'MN'
  • 19. xVelocity – Examples (1) Create COLUMNSTORE INDEX continued … • select * from SomeTable • -- create columnstore index • CREATE NONCLUSTERED COLUMNSTORE INDEX [NonClusteredColumnStoreIndex-TEST] ON [dbo].[SomeTable] • ( • [StateAbbr], • [StateName], • [ANote] • )WITH (DROP_EXISTING = OFF) ON [PRIMARY] • -- try to update again • -- this is not allowed, while the table has an active columnstore index • UPDATE SomeTable SET • ANote = 'The weather was nice.' • where StateAbbr = 'MN' • select * from SomeTable • -- disable the index • ALTER INDEX [NonClusteredColumnStoreIndex-TEST] ON [dbo].[SomeTable] DISABLE • GO • -- reenable the index • ALTER INDEX [NonClusteredColumnStoreIndex-TEST] ON [dbo].[SomeTable] REBUILD • GO