Project “Hekaton” adds in-memory technology to boost performance of OLTP workloads in SQL Server.

Slides:



Advertisements
Similar presentations
DAT 342 Advanced SQL Server Performance and Tuning Bren Newman Program Manager SQL Server Development Microsoft Corporation.
Advertisements

new database engine component fully integrated into SQL Server 2014 optimized for OLTP workloads accessing memory resident data achive improvements.
| Basel SQL Server 2014: In- Memory OLTP Stéphane Haby - Stéphane Savorgnano Consultant dbi services.
Les Conférences Groupe des Utilisateurs SQL Server Juin 2013 – SQL Server in-memory Alexandre Chemla – Masao Frédéric Pichaut – Microsoft.
In-Memory Technologies Enhanced High Availability New Hybrid Scenarios In-Memory OLTP 5-25x performance gain for OLTP integrated into SQL Server In-Memory.
6 SQL Server Integration Same manageability, administration & development experience Integrated queries & transactions Integrated HA and backup/restore.
Administering Microsoft SQL Server 2012 Databases.
Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because.
Drsql.org How In-Memory Affects Database Design Louis Davidson Certified Nerd 1.
2015 International TechNet Wiki Summit 2015 Saeid Hasani Structured Error Handling Mechanism in SQL Server 2012 & 2014.
Applications hitting a wall today with SQL Server Locking/Latching Scale-up Throughput or latency SLA Applications which do not use SQL Server today.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 13 Managing Databases with SQL Server 2000.
A Comedy of Errors Handling Errors in T-SQL Code Andrew Whettam.
Module 12 Handling Errors in T-SQL Code. Module Overview Understanding T-SQL Error Handling Implementing T-SQL Error Handling Implementing Structured.
Drsql.org How In-Memory Affects Database Design Louis Davidson Certified Nerd 1.
Drsql.org How In-Memory Affects Database Design Louis Davidson Certified Nerd 1.
Stored Procedures, Transactions, and Error-Handling
SQL Server 2014: In In-memory OLTP for Database Developers.
Applications hitting a wall today with SQL Server Locking/Latching Scale-up Throughput or latency SLA Applications which do not use SQL Server.
SQL Server 2014 adds in-memory technology to boost performance of OLTP workloads.
IN-MEMORY OLTP By Manohar Punna SQL Server Geeks – Regional Mentor, Hyderabad Blogger, Speaker.
Module 8: Implementing Stored Procedures. Overview Implementing Stored Procedures Creating Parameterized Stored Procedures Working With Execution Plans.
Module 11 Creating Highly Concurrent SQL Server® 2008 R2 Applications.
Drsql.org How In-Memory Affects Database Design Louis Davidson Certified Nerd.
Meet Kevin Liu Principal Lead Program Manager Kevin Liu has been with Microsoft and the SQL Server engine team for 7 years, working on key projects like.
Ἑ κατόν by Niko Neugebauer. Niko Neugebauer PASS EvangelistPASS Evangelist SQL Server MVPSQL Server MVP SQLPort ( founder & leaderSQLPort.
06 | Modifying Data in SQL Server Brian Alderman | MCT, CEO / Founder of MicroTechPoint Tobias Ternstrom | Microsoft SQL Server Program Manager.
Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Moore’s Law means more transistors and therefore cores, but… CPU clock rate stalled… Meanwhile RAM cost continues to drop.
Buffer Pool Memory Optimized Tables Available Memory Buffer Pool Memory Optimized Tables Buffer Pool Memory Optimized Tables Buffer Pool Memory.
Drsql.org How In-Memory Affects Database Design Louis Davidson Certified Nerd 1.
Sofia Event Center November 2013 Margarita Naumova SQL Master Academy.
Stored Procedure Optimization Preventing SP Time Out Delay Deadlocking More DiskReads By: Nix.
Applications hitting a wall today with SQL Server Locking/Latching Scale-up Throughput or latency SLA Applications which do not use SQL Server today.
Module 11: Managing Transactions and Locks
IT420: Database Management and Organization Triggers and Stored Procedures 24 February 2006 Adina Crăiniceanu
Drsql.org How In-Memory Affects Database Design Louis Davidson 1.
Vedran Kesegić. About me  M.Sc., FER, Zagreb  HRPro d.o.o. Before: Vipnet, FER  13+ years with SQL Server (since SQL 2000)  Microsoft Certified.
Does the Optimistic Concurrency resolve your blocking problems Margarita Naumova, SQL Master Academy.
SQL Server 2014: In-Memory OLTP Adoption Considerations Mike
Redmond Protocols Plugfest 2016 Jos de Bruijn, Borko Novakovic SQL In-Memory OLTP Senior Program Manager.
Mladen Prajdić SQL Server MVP Hekaton The New SQL Server In-Memory OLTP Engine.
In-Memory OLTP: Concepts and Improvements in SQL Server 2016
In-Memory Capabilities
Architectures and Case Studies with In-Memory OLTP in SQL
InMemory improvements on SQL Server 2016
SQL Server In-Memory OLTP: What Every SQL Professional Should Know
UFC #1433 In-Memory tables 2014 vs 2016
LAB: Web-scale Data Management on a Cloud
7/17/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
9/11/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
SQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory Overview
Graeme Malcolm | Data Technology Specialist, Content Master
මොඩියුල විශ්ලේෂණය Buffer Pool Extension භාවිතය.
Super Scaling The LMAX Queue Pattern.
Migrating a Disk-based Table to a Memory-optimized one in SQL Server
SQL 2014 In-Memory OLTP What, Why, and How
Batches, Transactions, & Errors
මොඩියුල විශ්ලේෂණය Transactions කළමනාකරණය.
The PROCESS of Queries John Deardurff
Accelerate Your Data Insights with SQL Server 2014
Microsoft Ignite /1/ :19 PM
The PROCESS of Queries John Deardurff Website: ThatAwesomeTrainer.com
Statistics for beginners – In-Memory OLTP
In-Memory OLTP for Database Developers
The PROCESS of Queries John Deardurff
Batches, Transactions, & Errors
Server-Side Programming
SQL Server 2014: In-Memory OLTP Overview
Presentation transcript:

Project “Hekaton” adds in-memory technology to boost performance of OLTP workloads in SQL Server

CREATE TABLE [Customer]( [CustomerID] INT NOT NULL PRIMARY KEY NONCLUSTERED HASH WITH (BUCKET_COUNT = ), [Name] NVARCHAR(250) NOT NULL INDEX [IName] HASH WITH (BUCKET_COUNT = ), [CustomerSince] DATETIME NULL ) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA); This table is memory optimized This table is durable Secondary Indexes are specified inline Hash Index

CREATE TABLE DDLCode generation and compilationTable DLL producedTable DLL loaded

90,150 Susan Bogota 50, ∞ JanePrague 100, 200 JohnParis 200, ∞ JohnBeijing TimestampsNameChain ptrsCity Hash index on City Hash index on Name Garbage Collection Removes Unused Rows

CREATE PROCEDURE DATETIME WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER AS BEGIN ATOMIC WITH (TRANSACTION ISOLATION LEVEL = SNAPSHOT, LANGUAGE = 'us_english') -- insert T-SQL here END This proc is natively compiled Native procs must be schema-bound Atomic blocks Create a transaction if there is none Otherwise, create a savepoint Execution context is required Session settings are fixed at create time

CREATE PROC DDLQuery optimizationCode generation and compilationProcedure DLL producedProcedure DLL loaded

Accessing Memory Optimized Tables Natively Compiled Procs – Access only memory optimized tables – Maximum performance – Limited T-SQL surface area When to use – OLTP-style operations – Optimize performance critical business logic Interpreted T-SQL Access (InterOP) – Access both memory- and disk-based tables – Less performant – Virtually full T-SQL surface When to use – Ad hoc queries – Reporting-style queries – Speeding up app migration – Eliminating Latch Contention

TimeTransaction T1 (SNAPSHOT)Transaction T2 (SNAPSHOT) 1BEGIN 2 3UPDATE t SET c1=‘bla’ WHERE c2=123 4UPDATE t SET c1=‘bla’ WHERE c2=123 (write conflict) First writer wins

Disk-based tablesMemory-optimized tables Tab1TabnTab1Tabm Regular Tx contextHekaton Tx context

Disk-basedMemory optimizedUsage recommendations READCOMMITTEDSNAPSHOT Baseline combination – most cases that use READCOMMITTED today READCOMMITTEDREPEATABLEREAD/ SERIALIZABLE Data migration Hekaton-only Interop REPEATABLEREAD/ SERIALIZABLE SNAPSHOT Memory-optimized table access is INSERT-only Useful for data migration and if no concurrent writes on memory-optimized tables (e.g., ETL) Disk-basedMemory optimized SNAPSHOT Any isolation level REPEATABLEREAD/ SERIALIZABLE REPEATABLEREAD/ SERIALIZABLE Supported isolation level combinations (V1) Unsupported isolation level combinations (V1)

CREATE PROCEDURE type2,... AS BEGIN END

CREATE PROCEDURE type2,... AS BEGIN INT = 10 WHILE > 0) BEGIN END

CREATE PROCEDURE type2,... AS BEGIN INT = 10 WHILE > 0) BEGIN BEGIN TRY = 0 END TRY BEGIN CATCH -= 1 END CATCH END

CREATE PROCEDURE type2,... AS BEGIN INT = 10 WHILE > 0) BEGIN BEGIN TRY = 0 END TRY BEGIN CATCH -= 1 IF > 0 AND error_number() in (41302, 41305, 41325, 41301, 1205)) IF ROLLBACK TRANSACTION ELSE THROW END CATCH END Deadlock (for disk-based tables) Hekaton-specific error codes

CREATE PROCEDURE type2,... AS BEGIN INT = 10 WHILE > 0) BEGIN BEGIN TRY = 0 END TRY BEGIN CATCH -= 1 IF > 0 AND error_number() in (41302, 41305, 41325, 41301, 1205)) IF ROLLBACK TRANSACTION ELSE THROW END CATCH END

CREATE TABLE t1 ( c1 INT NOT NULL IDENTITY..., c2 INT, c3 DATE) CREATE TABLE t1 ( c1 INT NOT NULL..., c2 INT, c3 DATE) WITH (MEMORY_OPTIMIZED=ON) Before migration:After migration: CREATE PROC INT, c3 DATE AS BEGIN INSERT INTO t1 END CREATE SEQUENCE usq_t1 AS INT START WITH 1 INCREMENT BY 1 CREATE PROC INT, c3 DATE AS BEGIN INT = NEXT VALUE FOR usq_t1 INSERT INTO END

Windows Azure