Home
%3CLINGO-SUB%20id%3D%22lingo-sub-367981%22%20slang%3D%22en-US%22%3ESQL%20Server%202016%20improvements%20for%20SAP%20(BW)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-367981%22%20slang%3D%22en-US%22%3E%3CUL%3E%0A%3CLI%3E%3CSTRONG%3E%3CEM%3EFirst%20published%20on%20MSDN%20on%20Nov%2011%2C%202016%20by%20Martin%20Merdes.%20%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3E%3CEM%3EThis%20blog%20post%20might%20be%20outdated%20by%20now.%26nbsp%3BThe%20latest%20documentation%20regarding%20SQL%20Server%20Columnstore%20on%20SAP%20is%20available%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.sap.com%2Fdocuments%2F2019%2F04%2F023e5928-487d-0010-87a3-c30de2ffd8ff.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.sap.com%2Fdocuments%2F2019%2F04%2F023e5928-487d-0010-87a3-c30de2ffd8ff.html%3C%2FA%3E%20and%20in%26nbsp%3BSAP%20Note%202116639%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3E%3CEM%3EThe%20performance%20impact%20of%20SQL%20Server%20Columnstore%20is%20described%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FRunning-SAP-Applications-on-the%2FPerformance-evolution-of-SAP-BW-on-SQL-Server%2Fba-p%2F368073%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FRunning-SAP-Applications-on-the%2FPerformance-evolution-of-SAP-BW-on-SQL-Server%2Fba-p%2F368073%3C%2FA%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ESAP%20recently%20released%20support%20for%20SQL%20Server%202016%20for%20some%20SAP%20NetWeaver%20based%20systems.%20SQL%20Server%202016%20contains%20many%20new%20features%20which%20can%20be%20used%20by%20SAP.%20For%20SAP%20BW%2C%20particularly%20the%20improved%20columnstore%20features%20are%20relevant.%20An%20overview%20of%20SQL%20Server%20Columnstore%20in%20SQL%20Server%202014%20is%20published%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FRunning-SAP-Applications-on-the%2FConcepts-of-SQL-Server-2014-Columnstore%2Fba-p%2F367878%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FRunning-SAP-Applications-on-the%2FConcepts-of-SQL-Server-2014-Columnstore%2Fba-p%2F367878%3C%2FA%3E.%20The%20most%20important%20columnstore%20improvements%20in%20SQL%20Server%202016%20are%20discussed%20below%3A%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1735149820%22%20id%3D%22toc-hId-1735149820%22%3EBatch%20mode%20available%20for%20more%20operators%20and%20with%20maxdop%201%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3ESince%20SQL%20Server%202014%20there%20are%20three%20types%20of%20parallelism%20used%20for%20columnstore%20processing%3A%20Firstly%2C%20several%20SQL%20Server%20queries%20are%20running%20in%20parallel%20for%20a%20single%20SAP%20BW%20query%20(for%20example%20a%20SQL%20query%20against%20the%20f-fact%20table%20and%20another%20SQL%20query%20against%20the%20e-fact%20table).%20Secondly%2C%20a%20single%20SQL%20query%20can%20use%20many%20CPU%20threads%20at%20the%20same%20time%20(maxdop).%20Thirdly%2C%20a%20single%20CPU%20thread%20can%20process%20a%20set%20of%20rows%2C%20typically%20up%20to%20900%20rows%20(batch%20mode)%2C%20rather%20than%20processing%20row%20by%20row%20(row%20mode).%20SQL%20Server%202016%20can%20use%20the%20batch%20mode%20for%20much%20more%20operators%2C%20for%20example%20the%20sort%20operator.%20An%20overview%20is%20available%20at%20%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fdn935005.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fdn935005.aspx%20%3C%2FA%3E%20.%20%3CBR%20%2F%3EIn%20SQL%20Server%202014%2C%20single-threaded%20queries%20running%20under%20MAXDOP%201%20or%20with%20a%20serial%20query%20plan%20cannot%20use%20batch%20mode.%20Therefore%2C%20we%20recommended%20a%20relatively%20low%20value%20for%20the%20SAP%20RSADMIN%20parameter%20MSS_MAXDOP_QUERY%2C%20which%20controls%20the%20maxdop%20setting%20used%20for%20BW%20queries%20(see%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FRunning-SAP-Applications-on-the%2FOptimizing-BW-Query-Performance%2Fba-p%2F367551%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FRunning-SAP-Applications-on-the%2FOptimizing-BW-Query-Performance%2Fba-p%2F367551%3C%2FA%3E).%20However%2C%20in%20SQL%20Server%202016%20batch%20mode%20can%20be%20used%20with%20maxdop%201.%20Therefore%2C%20queries%20are%20still%20pretty%20fast%2C%20even%20when%20there%20is%20only%20one%20CPU%20thread%20available%20during%20high%20workload.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--817007141%22%20id%3D%22toc-hId--817007141%22%3EColumnstore%20uses%20vector%20instructions%20(SSE%2FAVX)%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3EIn%20addition%20to%20intra-query%20parallelism%20(maxdop)%20and%20batch%20mode%2C%20SQL%20Server%202016%20uses%20another%20kind%20of%20parallelism%3A%20CPU%20vector%20instructions%20(AVX%20or%20SSE).%20You%20benefit%20most%20from%20this%20feature%20on%20most%20modern%20CPU%20generations.%20You%20can%20even%20use%20this%20feature%20in%20virtualized%20environments.%20More%20recent%20versions%20of%20virtualization%20layers%20used%20for%20private%20and%20public%20cloud%20like%20Azure%2C%20are%20supporting%20SSE%2FAVX%20instructions%20as%20well.%20SQL%20Server%20usage%20of%20SSE%2FAVX%20is%20described%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FSQL-Server-Support%2FSQL-2016-It-Just-Runs-Faster-Column-Store-Uses-Vector%2Fba-p%2F318739%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FSQL-Server-Support%2FSQL-2016-It-Just-Runs-Faster-Column-Store-Uses-Vector%2Fba-p%2F318739%3C%2FA%3E.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-925803194%22%20id%3D%22toc-hId-925803194%22%3ERowgroup%20Compression%20also%20merges%20rowgroups%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3EIn%20SQL%20Server%202014%2C%20you%20can%20perform%20columnstore%20rowgroup%20compression%20using%20the%20SQL%20command%20ALTER%20INDEX%20REORGANIZE.%20In%20SQL%20Server%202016%2C%20this%20SQL%20command%20performs%20additional%20optimizations%3A%20It%20also%20merges%20small%20rowgroups%20into%20a%20larger%20one%20for%20improving%20query%20performance.%20This%20is%20documented%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fdn935013.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fdn935013.aspx%20%3C%2FA%3E%20.%20In%20SAP%20BW%2C%20there%20is%20no%20need%20to%20run%20this%20SQL%20command%20manually.%20This%20is%20automatically%20done%20during%20BW%20Cube%20Compression%20and%20when%20executing%20an%20Index%20Repair%20(within%20a%20BW%20Process%20Chain).%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1626353767%22%20id%3D%22toc-hId--1626353767%22%3EParallel%20update%20of%20sampled%20statistics%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3EUpdate%20Statistics%20on%20BW%20fact%20tables%20can%20be%20very%20time%20consuming%2C%20in%20particular%20for%20a%20BW%20Flat%20Cube%20(see%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FRunning-SAP-Applications-on-the%2FColumnstore-Optimized-Flat-Cube-in-SAP-BW%2Fba-p%2F367884%22%20target%3D%22_self%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FRunning-SAP-Applications-on-the%2FColumnstore-Optimized-Flat-Cube-in-SAP-BW%2Fba-p%2F367884%3C%2FA%3E).%20By%20default%2C%20an%20Update%20Statistics%20on%20the%20fact%20table(s)%20is%20performed%20during%20BW%20Cube%20Compression.%20SQL%20Server%202016%20can%20use%20up%20to%2016%20CPU%20threads%20for%20running%20Update%20Statistics%20with%20default%20sample%20rate%20(vs.%20one%20thread%20in%20SQL%20Server%202014).%20See%20also%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FSQL-Server%2FQuery-Optimizer-Additions-in-SQL-Server-2016%2Fba-p%2F384739%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FSQL-Server%2FQuery-Optimizer-Additions-in-SQL-Server-2016%2Fba-p%2F384739%3C%2FA%3E.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-116456568%22%20id%3D%22toc-hId-116456568%22%3EWritable%20Nonclustered%20Columnstore%20Index%20(NCCI)%3C%2FH2%3E%0A%3CP%3E%3CBR%20%2F%3EIn%20SQL%20Server%202016%2C%20you%20can%20create%20an%20additional%2C%20%3CSTRONG%3E%20writable%20%3C%2FSTRONG%3E%20columnstore%20index%20on%20top%20of%20a%20table%2C%20which%20already%20has%20a%20primary%20key%20and%20other%20rowstore%20indexes.%20This%20feature%20is%20planned%20to%20be%20used%20in%20future%20SAP%20BW%20releases%20for%20implementing%20the%20columnstore%20on%20other%20BW%20objects%20besides%20the%20fact%20tables.%20%3CBR%20%2F%3ENCCIs%20are%20also%20useful%20for%20SAP%20ERP.%20SAP%20will%20not%20deliver%20NCCIs%20in%20standard%20ERP%20systems.%20However%2C%20customers%20can%20create%20a%20NCCI%20for%20some%20tables%20of%20their%20ERP%20system%20on%20their%20own.%20A%20detailed%20description%20and%20recommendations%20for%20such%20a%20project%20will%20be%20published%20in%20a%20BLOG%20next%20year.%20%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20list%20of%20SQL%20Server%202016%20features%20is%20by%20far%20not%20complete.%20For%20Example%2C%20we%20did%20not%20mention%20additional%20indexes%20on%20top%20of%20a%20Clustered%20Columnstore%20Index%20(CCI)%20or%20the%20new%20SQL%20Server%20Query%20Store.%20The%20intention%20of%20this%20blog%20was%20to%20give%20an%20overview%20of%20the%20features%2C%20which%20justify%20a%20database%20upgrade%20to%20SQL%20Server%202016%20for%20SAP%20BW.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-367981%22%20slang%3D%22en-US%22%3E%3CUL%3E%0A%3CLI%3E%3CSTRONG%3E%3CEM%3EFirst%20published%20on%20MSDN%20on%20Nov%2011%2C%202016%20by%20Martin%20Merdes.%20%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3E%3CEM%3EThis%20blog%20post%20might%20be%20outdated%20by%20now.%26nbsp%3BThe%20latest%20documentation%20regarding%20SQL%20Server%20Columnstore%20on%20SAP%20is%20available%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.sap.com%2Fdocuments%2F2019%2F04%2F023e5928-487d-0010-87a3-c30de2ffd8ff.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.sap.com%2Fdocuments%2F2019%2F04%2F023e5928-487d-0010-87a3-c30de2ffd8ff.html%3C%2FA%3E%20and%20in%26nbsp%3BSAP%20Note%202116639%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3E%3CEM%3EThe%20performance%20impact%20of%20SQL%20Server%20Columnstore%20is%20described%20in%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FRunning-SAP-Applications-on-the%2FPerformance-evolution-of-SAP-BW-on-SQL-Server%2Fba-p%2F368073%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FRunning-SAP-Applications-on-the%2FPerformance-evolution-of-SAP-BW-on-SQL-Server%2Fba-p%2F368073%3C%2FA%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-367981%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdministration%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ebw%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ecolumnstore%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENews%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPerformance%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESQL%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

SAP recently released support for SQL Server 2016 for some SAP NetWeaver based systems. SQL Server 2016 contains many new features which can be used by SAP. For SAP BW, particularly the improved columnstore features are relevant. An overview of SQL Server Columnstore in SQL Server 2014 is published here: https://techcommunity.microsoft.com/t5/Running-SAP-Applications-on-the/Concepts-of-SQL-Server-2014-C.... The most important columnstore improvements in SQL Server 2016 are discussed below:

Batch mode available for more operators and with maxdop 1


Since SQL Server 2014 there are three types of parallelism used for columnstore processing: Firstly, several SQL Server queries are running in parallel for a single SAP BW query (for example a SQL query against the f-fact table and another SQL query against the e-fact table). Secondly, a single SQL query can use many CPU threads at the same time (maxdop). Thirdly, a single CPU thread can process a set of rows, typically up to 900 rows (batch mode), rather than processing row by row (row mode). SQL Server 2016 can use the batch mode for much more operators, for example the sort operator. An overview is available at https://msdn.microsoft.com/en-us/library/dn935005.aspx .
In SQL Server 2014, single-threaded queries running under MAXDOP 1 or with a serial query plan cannot use batch mode. Therefore, we recommended a relatively low value for the SAP RSADMIN parameter MSS_MAXDOP_QUERY, which controls the maxdop setting used for BW queries (see https://techcommunity.microsoft.com/t5/Running-SAP-Applications-on-the/Optimizing-BW-Query-Performan...). However, in SQL Server 2016 batch mode can be used with maxdop 1. Therefore, queries are still pretty fast, even when there is only one CPU thread available during high workload.

Columnstore uses vector instructions (SSE/AVX)


In addition to intra-query parallelism (maxdop) and batch mode, SQL Server 2016 uses another kind of parallelism: CPU vector instructions (AVX or SSE). You benefit most from this feature on most modern CPU generations. You can even use this feature in virtualized environments. More recent versions of virtualization layers used for private and public cloud like Azure, are supporting SSE/AVX instructions as well. SQL Server usage of SSE/AVX is described here: https://techcommunity.microsoft.com/t5/SQL-Server-Support/SQL-2016-It-Just-Runs-Faster-Column-Store-....

Rowgroup Compression also merges rowgroups


In SQL Server 2014, you can perform columnstore rowgroup compression using the SQL command ALTER INDEX REORGANIZE. In SQL Server 2016, this SQL command performs additional optimizations: It also merges small rowgroups into a larger one for improving query performance. This is documented here: https://msdn.microsoft.com/en-us/library/dn935013.aspx . In SAP BW, there is no need to run this SQL command manually. This is automatically done during BW Cube Compression and when executing an Index Repair (within a BW Process Chain).

Parallel update of sampled statistics


Update Statistics on BW fact tables can be very time consuming, in particular for a BW Flat Cube (see https://techcommunity.microsoft.com/t5/Running-SAP-Applications-on-the/Columnstore-Optimized-Flat-Cu...). By default, an Update Statistics on the fact table(s) is performed during BW Cube Compression. SQL Server 2016 can use up to 16 CPU threads for running Update Statistics with default sample rate (vs. one thread in SQL Server 2014). See also https://techcommunity.microsoft.com/t5/SQL-Server/Query-Optimizer-Additions-in-SQL-Server-2016/ba-p/....

Writable Nonclustered Columnstore Index (NCCI)


In SQL Server 2016, you can create an additional, writable columnstore index on top of a table, which already has a primary key and other rowstore indexes. This feature is planned to be used in future SAP BW releases for implementing the columnstore on other BW objects besides the fact tables.
NCCIs are also useful for SAP ERP. SAP will not deliver NCCIs in standard ERP systems. However, customers can create a NCCI for some tables of their ERP system on their own. A detailed description and recommendations for such a project will be published in a BLOG next year.

This list of SQL Server 2016 features is by far not complete. For Example, we did not mention additional indexes on top of a Clustered Columnstore Index (CCI) or the new SQL Server Query Store. The intention of this blog was to give an overview of the features, which justify a database upgrade to SQL Server 2016 for SAP BW.