| Basel SQL Server 2014: In- Memory OLTP Stéphane Haby - Stéphane Savorgnano Consultant dbi services.

Slides:



Advertisements
Similar presentations
Phoenix We put the SQL back in NoSQL James Taylor Demos:
Advertisements

Yukon – What is New Rajesh Gala. Yukon – What is new.NET Framework Programming Data Types Exception Handling Batches Databases Database Engine Administration.
Tuning: overview Rewrite SQL (Leccotech)Leccotech Create Index Redefine Main memory structures (SGA in Oracle) Change the Block Size Materialized Views,
new database engine component fully integrated into SQL Server 2014 optimized for OLTP workloads accessing memory resident data achive improvements.
Big Data Working with Terabytes in SQL Server Andrew Novick
6 SQL Server Integration Same manageability, administration & development experience Integrated queries & transactions Integrated HA and backup/restore.
A comparison of MySQL And Oracle Jeremy Haubrich.
Project “Hekaton” adds in-memory technology to boost performance of OLTP workloads in SQL Server.
Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because.
MSc IT UFIE8K-10-M Data Management Prakash Chatterjee Room 3P16
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #6.
CPSC-608 Database Systems Fall 2010 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #6.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
DBI308. What are SQL Server Fast Track Reference Configurations General Fast Track Recommendations Reference Configurations and Best Practices FT 3.0.
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
Ashwani Roy Understanding Graphical Execution Plans Level 200.
1099 Why Use InterBase? Bill Todd The Database Group, Inc.
Applications hitting a wall today with SQL Server Locking/Latching Scale-up Throughput or latency SLA Applications which do not use SQL Server.
Oracle Data Integrator Transformations: Adding More Complexity
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.
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
Ἑ κατόν by Niko Neugebauer. Niko Neugebauer PASS EvangelistPASS Evangelist SQL Server MVPSQL Server MVP SQLPort ( founder & leaderSQLPort.
Oracle 11g: SQL Chapter 4 Constraints.
Chapter 4 Constraints Oracle 10g: SQL. Oracle 10g: SQL 2 Objectives Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN.
Moore’s Law means more transistors and therefore cores, but… CPU clock rate stalled… Meanwhile RAM cost continues to drop.
SQL Server 2005 Engine Optimistic Concurrency Tony Rogerson, SQL Server MVP Independent Consultant 26 th.
Chapter 5 Index and Clustering
Session 1 Module 1: Introduction to Data Integrity
Sofia Event Center November 2013 Margarita Naumova SQL Master Academy.
Module 11: Managing Transactions and Locks
SQL Triggers, Functions & Stored Procedures Programming Operations.
In-Memory OLTP The faster is now simpler in SQL Server 2016.
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 Basics Review Reviewing what we’ve learned so far…….
Mladen Prajdić SQL Server MVP Hekaton The New SQL Server In-Memory OLTP Engine.
Doing fast! Optimizing Query performance with ColumnStore Indexes in SQL Server 2012 Margarita Naumova | SQL Master Academy.
Session Name Pelin ATICI SQL Premier Field Engineer.
Introducing Hekaton The next step in SQL Server OLTP performance Mladen Prajdić
Use Cases for In-Memory OLTP Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Memory-Optimized Tables Querying at the speed of light.
In-Memory Capabilities
Temporal Databases Microsoft SQL Server 2016
SQL Server In-Memory OLTP: What Every SQL Professional Should Know
Temporal Databases Microsoft SQL Server 2016
UFC #1433 In-Memory tables 2014 vs 2016
LAB: Web-scale Data Management on a Cloud
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
Taking your application to memory
Isolation Levels Understanding Transaction Temper Tantrums
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 භාවිතය.
Migrating a Disk-based Table to a Memory-optimized one in SQL Server
Taking your application to memory
In-Memory OLTP (IMOLTP) What Can It Do For Me?
Real world In-Memory OLTP
SQL 2014 In-Memory OLTP What, Why, and How
Optimistic Concurrency Internals
11/29/2018.
In Memory OLTP Not Just for OLTP.
Statistics for beginners – In-Memory OLTP
In-Memory OLTP for Database Developers
In Memory OLTP Not Just for OLTP.
Isolation Levels Understanding Transaction Temper Tantrums
Presentation transcript:

| Basel SQL Server 2014: In- Memory OLTP Stéphane Haby - Stéphane Savorgnano Consultant dbi services

Agenda Introduction How to process? Memory optimized objects Concurrency control Demo Conclusion

| Basel Introduction Chapter 1/6

Introduction Stéphane Savorgnano Consultant Mobile Stéphane Haby Delivery Manager Senior Consultant Mobile

Introduction dbi services Experts At Your Service  30 specialists in IT infrastructure  Certified, experienced, passionate Based In Switzerland  100% self-financed Swiss company  More than CHF 3 mio. in sales Leading In Infrastructure Services  Over 70 customers in CH, D, & F  30 SLAs dbi FlexService signed

Introduction Project Hekaton Delivering the feature In-Memory OLTP  Algorithms optimized for accessing in-memory data  Optimistic concurrency control: eliminate logical locks due to automatic snapshot isolation with multiple versioning  Lock free and latch free structures to access data Started around 4 years ago The goal Boost performance of OLTP workloads  Using new memory optimized technology

Introduction

| Basel How to process? Chapter 2/6

How to process?

| Basel Memory Optimized Objects Chapter 3/6

Filegroup

Memory Optimized Objects New kind of filegroup have been created  To contain memory optimized objects  Filegroup Container is first similar to filestream

Memory Optimized Objects Internal representation

Tables and Indexes

Memory Optimized Objects Tables and indexes can be created by script as usual A new type of index appear: Hash index  It is a non clustered index  Need the option bucket_count to know the size of the index (twice the size of the rows expected)

Memory Optimized Objects Table creation When the script is executed  A CREATE TABLE DDL code is generated  This CREATE TABLE DDL is transformed in a C program  This C program is compiled  A DLL is produced  The DLL is loaded in memory Files created for each table:

Memory Optimized Objects Hash Indexes  Use Hash function(f)  Maps randomly values to buckets  Defined in the system  Bucket_count  Number of slot in the hash index  Array of 8-byte memory pointers Hash mapping(with Bucket_count = 8): f(Yann) f(Greg) f(Steph) f(Audi) f(Mercedes), f(VW) Hash Collisions

Memory Optimized Objects 40, ∞ StephAudi TimestampsNameChain ptrsCarMaque Hash index on CarMaque Hash index on name 80, ∞ GregMercedes f(Greg) f(Steph) f(Audi) f(Mercedes)

Memory Optimized Objects 40, ∞ StephAudi TimestampsNameChain ptrsCarMaque Hash index on CarMaque Hash index on name 80, ∞ GregMercedes f(Audi) 90, ∞ YannAudi f(Yann) T90: Insert(Yann, Audi)

Memory Optimized Objects 40, ∞ StephAudi TimestampsNameChain ptrsCarMaque Hash index on CarMaque Hash index on name 80, ∞ GregMercedes 90, ∞ YannAudi T120: Delete(Greg, Mercedes) 80, 120

Memory Optimized Objects 40, ∞ StephAudi Timestamps Name Chain ptrsCarMaque Hash index on CarMaque Hash index on name 80, ∞ GregMercedes 90, ∞ YannAudi T180: Update(Yann, Audi) to (Yann, Mercedes) 80, , ∞ YannMercedes 90, 180 f(Yann) f(Mercedes)

Memory Optimized Objects 40, ∞ StephAudi Timestamps Name Chain ptrsCarMaque Hash index on CarMaque Hash index on name T220: Garbage collector 80, ∞ GregMercedes80, , ∞ YannMercedes 90, ∞ YannAudi90, 180 f(Yann) f(Mercedes) f(Audi) f(Steph)

Memory Optimized Objects Limitations on tables for version CTP1 No foreign key and check constraints No identity (now available with CTP2, just (1,1)) Cannot alter table, need to drop and recreate the table Cannot add or remove an index, need to drop and recreate table No LOB(Large Object) like nvarchar(max) Max size for a row is 8060 bytes(optimized for in–memory) No DML Triggers No XML or CLR data types

Stored Procedures

Memory Optimized Objects Stored procedure can be created by script with special arguments No alter procedure possible, need to drop and recreate the procedure

Memory Optimized Objects When the script is executed  A CREATE PROC DDL code is generated  The query is optimized  A C program is generated for CREATE PROC DLL  This C program is compiled  A DLL is produced  The DLL is loaded in memory Files created for each Stored procedure(same files than for a table)

Memory Optimized Objects How to work with in-Memory tables T-SQL  Possibility to access in the same script in-memory and disk based tables  Less efficient  But all T-SQL Surface When to use  Adhoc queries  Reporting queries  Migration queries Natively compile Stored Procedures  Cannot access disk tables, only in- memory tables  Very efficient  Limited T-SQL Surface(or, outer join…) When to use  OLTP style operations  Critical performance operations

| Basel Concurrency control Chapter 4/6

Concurrency control In-Memory table  Multi-version: each tables can have multiple versions of each rows  Transaction isolation level is snapshot based  Transaction semantic is optimistic: always assume that a transaction is going to commit(no locks, no latches)  Conflict detection to ensure isolation(no deadlocks) Disk based table  Locking and blocking to guaranty isolation (even with snapshot or read committed snapshot you use locking for write)

| Basel Demo Chapter 5/6

Demo

| Basel Conclusion Chapter 6/6

Conclusion New memory optimized tables New hash indexes New natively compiled stored procedures Bring best performance Multi-versioned rows, snapshot based isolation Optimistics: no locking, conflict detection T-SQL limitations Cannot alter in-memory tables Cannot alter natively compiled stored procedures

Conclusion SQL Server 2014 web site SQL Server 2014 CPT2 download SQL Server 2014 CTP2: In-Memory Advisor for Tables and Stored