SQL Server 2014 adds in-memory technology to boost performance of OLTP workloads.

Slides:



Advertisements
Similar presentations
Phoenix We put the SQL back in NoSQL James Taylor Demos:
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.
Project “Hekaton” adds in-memory technology to boost performance of OLTP workloads in SQL Server.
Planning on attending PASS Summit 2014? The world’s largest gathering of SQL Server & BI professionals Take your SQL Server skills to the.
Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
Chapter 3 An Introduction to Relational Databases.
Drsql.org How In-Memory Affects Database Design Louis Davidson Certified Nerd 1.
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.
Chapter 3 An Introduction to Relational Databases.
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.
IN-MEMORY OLTP By Manohar Punna SQL Server Geeks – Regional Mentor, Hyderabad Blogger, Speaker.
Drsql.org How In-Memory Affects Database Design Louis Davidson Certified Nerd.
DAT602 Database Application Development Lecture 2 Review of Relational Database.
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.
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.
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
Sofia Event Center November 2013 Margarita Naumova SQL Master Academy.
Applications hitting a wall today with SQL Server Locking/Latching Scale-up Throughput or latency SLA Applications which do not use SQL Server today.
PASS Virtual Chapter presentation March 27, 2014.
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
Chapter 3 An Introduction to Relational Databases.
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.
Memory-Optimized Tables Querying at the speed of light.
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
In-Memory OLTP for DBA Management
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.
TechEd /6/2018 7:34 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered 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 In-Memory Internals
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
Real world In-Memory OLTP
SQL 2014 In-Memory OLTP What, Why, and How
Batches, Transactions, & Errors
The PROCESS of Queries John Deardurff
Accelerate Your Data Insights with SQL Server 2014
1/3/2019 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
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
Sunil Agarwal | Principal Program Manager
Presentation transcript:

SQL Server 2014 adds in-memory technology to boost performance of OLTP workloads

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

Array of 8-byte Memory pointers Hash index with (bucket_count=8): Hash function f: Maps values to buckets Built into the system Hash mapping: f(Jane) f(John) f(Susan) f(Prague) f(Bogota), f(Beijing) Hash Collisions

50, ∞ JanePrague TimestampsNameChain ptrsCity Hash index on City Hash index on Name 90, ∞ Susan Bogota f(Jane) f(Susan) f(Prague) f(Bogota)

50, ∞ JanePrague TimestampsNameChain ptrsCity Hash index on City Hash index on Name T100: INSERT (John, Prague) 100, ∞ JohnPrague 90, ∞ Susan Bogota f(John) f(Prague)

90, ∞ Susan Bogota 50, ∞ JanePrague TimestampsNameChain ptrsCity Hash index on City Hash index on Name T150: DELETE (Susan, Bogota) 100, ∞ JohnPrague 90, 150

Susan Bogota 50, ∞ JanePrague TimestampsNameChain ptrsCity Hash index on City Hash index on Name T200: UPDATE (John, Prague) to (John, Beijing) 100, ∞ JohnPrague 200, ∞ JohnBeijing 100, 200 f(Beijing) f(John)

90, 150 Susan Bogota 50, ∞ JanePrague TimestampsNameChain ptrsCity Hash index on City Hash index on Name T250: Garbage collection 100, 200 JohnPrague 200, ∞ JohnBeijing f(John) f(Jane) f(Beijing) f(Prague)

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 – 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

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

Disk-based tablesMemory-optimized tables Tab1TabnTab1Tabm Regular Tx contextMem-opt 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)