In this post I want to share my experience with the implementation of the column store on the Microsoft SQL Server and Microsoft’s port onto SAP BW. This post will not describe the technical information like the setup or implementation. There information are already well described in blog posts of Martin Merdes as well in SNotes.
This blog post is structured as the following:
Since there are already good descriptions available, I will give only a very short overview. For a detailed description I recommend the following links:
The column store within MS SQL Server is nothing new. The implementation is delivered with the MS SQL Server itself. Martin Merdes and his team port the implementation to SAP BW. A column store implementation exists besides Microsoft’s SQL Server also for DB2 (SNote 2301464) or Oracle (SNote 2150530/SNote 2351252).
In context of SAP BW the column store is used for cubes. There are also ways to use the column store within an ERP system.
The practical implementation can be read in the detailed posts of Martin Merdes or in the SAP SNotes.
Column Store Index
In this implementation the index replaces the index of cubes. The B-Tree index is replaced by a column store index. The column store index is smaller than the B-Tree index, so that reduction in of the required storage space is expected.
There are different versions of the column store index depending on the version of MS SQL Server. In the beginning with MS SQL Server 2012 the column store index was not update-able. The column store index could only be applied to the e-fact table. It is recommended to use the latest version of the MS SQL Server.
Flatcube
The flatcube is very similar to the HANA optimized cube. A flatcube has besides a dimension for the requests no other dimension. There is also only one fact table. The SIDs are stored directly in the fact table (comparable to a line item).
Onced converted into a flatcube, the cube cannot be loaded into a BWA. It is always possible to convert the cube back to a standard cube.
A look into the ABAP dictionary shows the different amount of objects. This makes it clear, that the flatcube has a lower number of objects.
FEMS-Pushdown
The FEMS-Pushdown is a mechanism provided by a new statement generator by Microsoft. The query statements are split up thus a parallel processing within in the database is possible. In order this to work a query has to have at least two FEMS. FEMS stands for Form EleMent Selektion. A FEMS can be a key figure with a specific selection – for example a sales number from a specific customer and region.
With the standard statement generator query filters are applied quite late during processing. Thus it can happen that a large amount of data is transferred to the application server, before filters are applied. On the application server the data gets filtered and aggregated.
With the FEMS-Pushdown the calculation and filtering are pushed into the database to a bigger degree. Therefore the overall query performance can be improved. The FEMS-Pushdown can only be used in combination with a flatcube.
The following table shows an extreme example.
This blog post is structured as the following:
- Overview of the implementation of the column store from Microsoft within SAP BW
- Testing Mehods and results
- Conclusion
Since there are already good descriptions available, I will give only a very short overview. For a detailed description I recommend the following links:
- Optimizing BW Query Performance 2013
- SQL Server 2014 Columnstore: Released for SAP BW 2015
- Concepts of SQL Server 2014 Columnstore 2015
- Columnstore Optimized Flat Cube in SAP BW 2015
- SQL Server 2016 improvements for SAP (BW) 2016
- Simplified and faster SAP BW Process Chains 2016
- Recent SAP BW improvements for SQL Server 2017
- BW Queries by factors faster using FEMS-pushdown 2017
- Performance evolution of SAP BW on SQL Server 2017
- Customer experience with SAP BW FEMS-Pushdown 2017
- Improve SAP BW Performance by Applying the Flat Cube 2018
- Columnstore became default in SAP BW 2018
The column store within MS SQL Server is nothing new. The implementation is delivered with the MS SQL Server itself. Martin Merdes and his team port the implementation to SAP BW. A column store implementation exists besides Microsoft’s SQL Server also for DB2 (SNote 2301464) or Oracle (SNote 2150530/SNote 2351252).
In context of SAP BW the column store is used for cubes. There are also ways to use the column store within an ERP system.
The practical implementation can be read in the detailed posts of Martin Merdes or in the SAP SNotes.
Column Store Index
In this implementation the index replaces the index of cubes. The B-Tree index is replaced by a column store index. The column store index is smaller than the B-Tree index, so that reduction in of the required storage space is expected.
There are different versions of the column store index depending on the version of MS SQL Server. In the beginning with MS SQL Server 2012 the column store index was not update-able. The column store index could only be applied to the e-fact table. It is recommended to use the latest version of the MS SQL Server.
Flatcube
The flatcube is very similar to the HANA optimized cube. A flatcube has besides a dimension for the requests no other dimension. There is also only one fact table. The SIDs are stored directly in the fact table (comparable to a line item).
Onced converted into a flatcube, the cube cannot be loaded into a BWA. It is always possible to convert the cube back to a standard cube.
Comparison Dimensions Standard
A look into the ABAP dictionary shows the different amount of objects. This makes it clear, that the flatcube has a lower number of objects.
Objects in the ABAP dictionary (flatcube top – standard cube bottom)
FEMS-Pushdown
The FEMS-Pushdown is a mechanism provided by a new statement generator by Microsoft. The query statements are split up thus a parallel processing within in the database is possible. In order this to work a query has to have at least two FEMS. FEMS stands for Form EleMent Selektion. A FEMS can be a key figure with a specific selection – for example a sales number from a specific customer and region.
With the standard statement generator query filters are applied quite late during processing. Thus it can happen that a large amount of data is transferred to the application server, before filters are applied. On the application server the data gets filtered and aggregated.
With the FEMS-Pushdown the calculation and filtering are pushed into the database to a bigger degree. Therefore the overall query performance can be improved. The FEMS-Pushdown can only be used in combination with a flatcube.
The following table shows an extreme example.
flatcube | fems pushdown |