Documente Academic
Documente Profesional
Documente Cultură
Martin Merdes
Senior Software Development Engineer
Microsoft Deutschland GmbH
SAP BW/SQL Server Porting
AGENDA
1. Columnstore Overview
3. SAP implementation
4. Customer experience
5. Summary
2
1. Columnstore Overview
2. SQL Server 2012 / 2014
3. SAP implementation
4. Customer experience
5. Summary
Columnstore overview
4
Columnstore overview
5
Columnstore overview
Original Table
(Row-Store)
6
Columnstore overview
Row Group 1
(up to 1 million rows)
Row Group 2
(up to 1 million rows)
7
Columnstore overview
Row Group 1
(up to 1 million rows)
Row Group 2
(up to 1 million rows)
8
Columnstore overview
Columnstore:
2 row-groups
6 segments per row-group
9
Columnstore overview
10
1. Columnstore Overview
2. SQL Server 2012 / 2014
3. SAP implementation
4. Customer experience
5. Summary
SQL Server 2012
12
SQL Server 2014
13
SQL Server 2014
Writable columnstore
Row-group consists of
Delta Store (row-store), for open row-groups
Compressed segments (column-store), for closed row groups
Deleted Bitmap
DML operations
INSERTs are written into Delta Store
DELETEs are removed from Delta Store, or row in segment is marked by Deleted Bitmap
UPDATEs are DELETEs followed by INSERTs
Row-group Compression
Tuple Mover runs every 5 minutes by default
It automatically compresses full row-groups (with 1 million rows),
i.e. data is moved from Delta Store to columnstore segments
Committed and uncommitted reads are not blocked during row-group compression
14
SQL Server 2014
X Row Group 1
(compressed)
X
X Row Group 2
(compressed)
15
1. Columnstore Overview
2. SQL Server 2012 / 2014
3. SAP implementation
4. Customer experience
5. Summary
SAP implementation 1st wave
18
1. Columnstore Overview
2. SQL Server 2012 / 2014
3. SAP implementation
4. Customer experience
5. Summary
Customer Experience
Index
Compression Size [GB] Size [KB] Data [KB] Index [KB] Data Comp. Comp. Percent Factor
Space savings NONE SQL_2005 34,8 36.481.296 14.534.760 21.946.536 NONE 10 * NONE 201 0,5
ROW SQL_2008 20,5 21.523.448 5.696.472 15.826.976 ROW 10 * ROW 119 0,8
Reduced number of indexes PAGE 17,3 18.154.648 4.214.480 13.940.168 PAGE 10 * PAGE
COLUMN-
100 1,0
BW Query performance
BW Query runtime consists of many parts
SQL query runtime (SAP BW data manager time)
Time spent on SAP application server (SAP BW OLAP time)
Network time to transfer (huge) result set
Result rendering time (on client)
Customers benefit only from columnstore,
if SQL query runtime is the bottleneck
Typical exceptions with high SAP BW OLAP time (spent on application server)
Cubes with high number of uncompressed requests (better compress all requests)
Multiprovider (use better one large cube instead)
SAP BW Exceptional Aggregation
22
Customer Experience
Impact of MaxDop
MSS_MAXDOP_QUERY (Default: 2)
Typically scales great for MSS_MAXDOP_QUERY = 8
However, you need sufficient free CPU threads for each parallel running BW query:
MSS_MAXDOP_QUERY threads per SQL query 8
2 SQL queries per cube (E-fact and F-fact table) 2
n cubes per BW multiprovider 3
Results in 8 * 2 * 3 = 48 threads 48
MSS_MAXDOP_INDEXING (Default: 8)
Scales great even for high values
Hardware requirements comparable with row-store
But do not expect good performance on a productive DB server with less than 16 CPU-threads
Memory requirements similar:
Additional RAM needed for Column Store Object Pool
However, less RAM needed for Buffer Pool (dropped b-tree indexes)
23
Customer Experience
BW Aggregates
Maintaining BW aggregates is a pain
New BW queries require often new aggregates
Columnstore works great for large cubes
No need to create aggregates just for reducing # characteristics
Columnstore also works fine with applying filters
Customer experience with columnstore
aggregates are not necessary in many cases
However, highly compressed aggregates (factor 100 and more) are still useful
Take care: The SAP OLAP processor is not aware of the columnstore
SAP BW prefers aggregates (without columnstore)
over basis cube (with columnstore)
24
1. Columnstore Overview
2. SQL Server 2012 / 2014
3. SAP implementation
4. Customer experience
5. Summary
Summary
Benefit of columnstore
Dramatic disk space savings (compared with PAGE compression)
~70% space saving with non-clustered CS (SQL Server 2012)
~90% space saving with clustered CS (SQL Server 2014)
Increased SQL Query performance by factor 3 to 6
Varying benefit dependent on query and cube design
Highest benefit for large BW cubes
BW queries can only benefit, if DB was the bottleneck
Runs on existing environment
Moderate CPU and memory resource requirements
DBAs can keep working with familiar environment
Easy to implement (create index by SAP)
Get rid of SAP BW aggregates in many cases
26
Summary
Related Content
Column-store indexes, described in SQL Server Books Online:
http://msdn.microsoft.com/en-us/library/gg492088.aspx
xVelocity technology, described in SQL Server Books Online:
http://msdn.microsoft.com/en-us/library/hh922900.aspx
SAP BW related issues in blog "SAP On SQL Server":
http://blogs.msdn.com/b/saponsqlserver/archive/tags/bw/
SAP Community Network "SAP On SQL Server":
http://scn.sap.com/community/sqlserver
27