SQL 2014 CTP1. Hekaton & CSI Version 2 unter der Lupe. Sascha Götz Karlsruhe, 03. Dezember 2013



Similar documents
Developing Microsoft SQL Server Databases MOC 20464

BOOST YOUR SQL PERFORMANCE BY USING THE NEW

SQL Server 2014 In-Memory Tables (Extreme Transaction Processing)

Course 20464C: Developing Microsoft SQL Server Databases

Developing Microsoft SQL Server Databases 20464C; 5 Days

20464C: Developing Microsoft SQL Server Databases

Neues in SQL Server Evaluierung SQL Server 2016 CTP 3 für den BI Stack. Sascha Götz Inovex GmbH

Course 20464: Developing Microsoft SQL Server Databases

Developing Microsoft SQL Server Databases

Developing Microsoft SQL Server Databases (20464) H8N64S

Exploring In-Memory OLTP

Performance Verbesserung von SAP BW mit SQL Server Columnstore

Outline. MCSE: Data Platform. Course Content. Course 10776C: MCSA: Developing Microsoft SQL Server 2012 Databases 5 Days

SQL Server In-Memory OLTP Internals Overview for CTP2

W I S E. SQL Server 2008/2008 R2 Advanced DBA Performance & WISE LTD.

David Dye. Extract, Transform, Load

Boost SQL Server Performance Buffer Pool Extensions & Delayed Durability

SQL Server In-Memory by Design. Anu Ganesan August 8, 2014

Hekaton: SQL Server s Memory-Optimized OLTP Engine

SQL Server Transaction Log from A to Z

Echtzeit-Analyse von Social Media Daten mit Jedox und GPU-beschleunigten OLAP Datenbanken

Microsoft SQL Database Administrator Certification

SQL Server In-Memory OLTP and Columnstore Feature Comparison

MS-40074: Microsoft SQL Server 2014 for Oracle DBAs

Course 55144B: SQL Server 2014 Performance Tuning and Optimization

Course 55144: SQL Server 2014 Performance Tuning and Optimization

PASS Deutschland e.v. Regionalgruppe Köln/Bonn/Düsseldorf

MySQL Cluster: HA als StorageEngine

Improve Business Productivity and User Experience with a SanDisk Powered SQL Server 2014 In-Memory OLTP Database

SQL Server 2012 Optimization, Performance Tuning and Troubleshooting

Implementing a Microsoft SQL Server 2008 Database

WITH A FUSION POWERED SQL SERVER 2014 IN-MEMORY OLTP DATABASE

"Charting the Course... MOC AC SQL Server 2014 Performance Tuning and Optimization. Course Summary

Physical Database Design and Tuning

Microsoft Nano Server «Tuva» Rinon Belegu

SQL Server 2014 New Features/In- Memory Store. Juergen Thomas Microsoft Corporation

1. Physical Database Design in Relational Databases (1)

Dynamics NAV/SQL Server Configuration Recommendations

Microsoft SQL Server performance tuning for Microsoft Dynamics NAV

SQL Server 2016 New Features!

Implementing a Microsoft SQL Server 2005 Database

Columnstore in SQL Server 2016

Course 6232A: Implementing a Microsoft SQL Server 2008 Database

05. Alternative Speichermodelle. Architektur von Datenbanksystemen I

SQL Object Level Recovery Native 1.1

SQL 2016 and SQL Azure

New Features in MySQL 5.0, 5.1, and Beyond

Optimizing Performance. Training Division New Delhi

Erste Schritte mit mysql. Der Umgang mit einer relationalen Datenbank

Windows Server Infrastructure and Storage for SQL Server & Hyper-V

SQL Server 2012 Query. Performance Tuning. Grant Fritchey. Apress*

SQL Server 2014 Performance Tuning and Optimization 55144; 5 Days; Instructor-led

Database Performance with In-Memory Solutions

Course Outline. SQL Server 2014 Performance Tuning and Optimization Course 55144: 5 days Instructor Led

Raima Database Manager Version 14.0 In-memory Database Engine

Cloud Performance Group 1. Event. 14. Januar 2016 / Matthias Gessenay (matthias.gessenay@corporatesoftware.ch)

SQL Server Storage: The Terabyte Level. Brent Ozar, Microsoft Certified Master, MVP Consultant & Trainer, SQLskills.com

EMC Greenplum. Big Data meets Big Integration. Wolfgang Disselhoff Sr. Technology Architect, Greenplum. André Münger Sr. Account Manager, Greenplum

Data Management in the Cloud

How To Improve Performance In A Database

Analytics To Go: Mobile BI. Mike Schiebel / Business Analytics Center of Excellence (CoE) SAP Switzerland June, 2013

Diese Liste wird präsentiert von. Netheweb.de

Design and Implementation

The First Example of TimesTen with Oracle on Windows

Updating Your SQL Server Skills to Microsoft SQL Server 2014

Oracle DBA Course Contents

MOC 20462C: Administering Microsoft SQL Server Databases

Retail POS Data Analytics Using MS Bi Tools. Business Intelligence White Paper

Copyright 2013, Oracle and/or its affiliates. All rights reserved. Customer Presentation

Microsoft SQL Server for Oracle DBAs Course 40045; 4 Days, Instructor-led

50238: Introduction to SQL Server 2008 Administration


Exadata for Oracle DBAs. Longtime Oracle DBA

MS 10977B Upgrading Your SQL Server Skills to Microsoft SQL Server 2014

Analytics & Marketing 4.0 Wie die Anwendung von BigData die Customer Loyalty von morgen schafft

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

Oracle Database 11 g Performance Tuning. Recipes. Sam R. Alapati Darl Kuhn Bill Padfield. Apress*

6231A - Maintaining a Microsoft SQL Server 2008 Database

Die Versant-DB ist ein wesentlicher Bestandteil von CADISON.

MySQL Storage Engines

Implementing a SQL Data Warehouse 2016

Practical Database Design and Tuning

ETL Process in Data Warehouse. G.Lakshmi Priya & Razia Sultana.A Assistant Professor/IT

Data warehousing with PostgreSQL

Database Administration with MySQL

Microsoft SQL Server Decision Support (DSS) Load Testing

Zielgruppe Dieses Training eignet sich für IT-Professionals.

In-Memory Databases MemSQL

SQL Server An Overview

Oracle Database 11g Comparison Chart

Performance Management of SQL Server

Configuring and Administering Hyper-V in Windows Server 2012 MOC 55021

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification

Transcription:

Hekaton & CSI Version 2 unter der Lupe Sascha Götz Karlsruhe, 03. Dezember 2013

Most of today s database managers are built on the assumption that data lives on a disk, with little bits of data at a time loaded into memory for manipulation. There s a whole lot of infrastructure involved in paging those subsets of data in and out[ ] - Kevin Farlee, SQL Server program manager, Microsoft - 2

Hekaton 3

Query SQL Server Cache Disk-Based File group Memory-Optimized Memory Index Synchronisation Disk Disk (Memory Dump) Index Paging Locking 4

Filegroup hinzufügen ALTER DATABASE [AdventureWorksDW2012] ADD FILEGROUP [Hekaton_FG] CONTAINS MEMORY_OPTIMIZED_DATA GO Datafile hinzufügen ALTER DATABASE [AdventureWorksDW2012] ADD FILE ( NAME = N'Hekaton', FILENAME = N'C:\Hekaton.ndf') TO FILEGROUP [Hekaton_FG] GO 5

CREATE TABLE [dbo].[factinternetsales_hekaton] ( [ProductKey] [int] NOT NULL, [OrderDateKey] [int] NOT NULL, [...], ) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA) DURABILITY: SCHEMA_AND_DATA Schema und Daten werden mit Disk synchronisiert Speicherplatz wird im RAM und auf Disk benötigt SCHEMA_ONLY Nur Schema wird mit Disk synchronisiert 6

Natively Compiled Stored Procedure CREATE PROCEDURE <Schema_Name, sysname, dbo>.<procedure_name, sysname, Procedure_Name> -- Add the parameters for the stored procedure here [ ] WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER AS BEGIN ATOMIC WITH --Insert statements for the stored procedure here [ ] END Nur Abfrage auf In-Memory Tabellen 7

Index Memory Optimized tables müssen mindestens einen Index haben (auf PK) Keine Clustered Indizes Indexe werden nur im Speicher gehalten Kein Index Drop, Rebuild Max. 8 Index pro Tabelle CI Date Date Non-CI I1 I2 I8 Date Order# 1 11.11.13 13.11.13 1 3 6 13.11.13 98165 2 12.11.13 16.11.13 2 6 2 16.11.13 98121 3 13.11.13 14.11.13 3 4 1 14.11.13 98474 4 14.11.13 17.11.13 4 7 3 17.11.13 98521 5 15.11.13 15.11.13 5 5 4 15.11.13 98451 6 16.11.13 11.11.13 6 1 5 11.11.13 98514 7 17.11.13 12.11.13 7 2 7 12.11.13 98563 8

Limitations Keine Trigger Keine Foreign Key & Constraints Keine Identity columns Keine Schema changes (ALTER TABLE ) 9

Demo

Dauer in Sekunden SQL 2014 CTP1 45 40 Aggregierung (SUM & Group BY) über 2 Mio Datensätze 40 35 30 25 20 20 15 10 5 0 Ohne Index On-Disk In-Memory 4 1 Non-Clustered Index 11

Dauer in Sekunden SQL 2014 CTP1 70 Update 2 Mio Datensätze 60 60 50 52 40 30 32 20 10 0 1 On-Disk In-Memory In-Mermory + Natively Compiled 12

Dauer in Sekunden SQL 2014 CTP1 18 1 Mio. Datensätze Load 17 16 14 13 12 10 8 6 4 2 0 On-Disk 1 In-Memory 13

Vorteile Performance Performance Performance Kritik Stabilität Speichermanagement Auslagerungs-Falle Fehlende Features (FKs, Identity Columns, Constraints) Bestehende Tabellen können nicht in die Hekaton Filegroup verschoben werden 14

Einsatzzweck DURABILITY: SCHEMA_ONLY ETL Load Tabelle Temp Tabellen DURABILITY: SCHEMA_AND_DATA Log-Tabellen 15

Columnstore Index Columnstore Index 2 16

Columnstore Index Non-Clustered Columnstore Index (SQL Server 2012) (+) Performance (+) Easy-To-Use (-) Read-Only Clustered Columnstore Index (SQL Server 2014 CTP 1) (+) Performance (+) Easy-To-Use (+) Updateable (-) Keine PK & FK (-) Keine Constraints 17

Dauer in Sekunden SQL 2014 CTP1 Columnstore Index 120 Aggregierung (SUM & Group BY) über 25 Mio Datensätze 106 100 80 71 60 40 20 9 1 0 1 Ohne Index Non-Clustered Index Non-Clustered Columnstore Index Clustered Columnstore Index 18

Nicht möglich Dauer in Sekunden SQL 2014 CTP1 Columnstore Index 30 1 Mio. Datensätze Load 27 25 23 20 20 15 10 5 0 Ohne Index Non-Clustered Index Non-Clustered Columnstore Index Clustered Columnstore Index 19

Columnstore Index Daten doch Laden bei Non-Clustered Columnstore Index? Drop, Load and Rebuild Drop Load Build 4 20 103 Partition Swap Split Load Build Swap 1 20 5 1 Szenario: 25 Mio Datensätze, Non-Clustered CSI, 1 Mio Datensätze Load 20

Columnstore Index HowTo: Partition Swapping Tabelle partitionieren Leere Partitionen Load in Temp laden Partition Split CSI Index erstellen Switch CSI Facts 2011-2013 <2011 2011 2012 2013 >2013 2014 2014 >2014 21

Dauer in Sekunden Drop & Rebuild SQL 2014 CTP1 Columnstore Index 140 1 Mio. Datensätze Load 127 120 100 80 60 40 20 20 23 27 27 Partition Swap 0 Ohne Index Non-Clustered Index Non-Clustered CSI Non-Clustered CSI2 Clustered Columnstore Index 22

Columnstore Index Fazit Query-Performance: Gigantisch Load-Performance: Mäßig bis Schlecht Nachteile: Vorhanden Einsatzzweck: Non-Clustered CSI BI Fact tables mit daily/nightly Loads Partition Swap oder Index Rebuild Clustered CSI Log Tabellen Solo -Tabellen (ohne PK /FK) 23

Fragen? 24

Ressources SQL Server Hekaton CTP1 White Paper http://download.microsoft.com/download/f/5/0/f5096a71-3c31-4e9f-864e- A6D097A64805/SQL_Server_Hekaton_CTP1_White_Paper.pdf http://blogs.msdn.com/b/arvindsh/archive/2013/07/03/sql-2014-in-memory-oltphekaton-training-videos-and-white-papers.aspx http://www.databasejournal.com/features/mssql/new-enhanced-column-storeindex-in-sql-server-2014-part-1.html http://rusanu.com/2011/07/13/how-to-update-a-table-with-a-columnstore-index/ 25