SlideShare uma empresa Scribd logo
1 de 24
http://aka.ms/bobsql
bobward@microsoft.com
@bobwardms, #bobsql
Latch free since 2007http://aka.ms/bobwardms
How do I
use this?
Based on SQL
Server 2016
ἑκατόν
OLTP Through the Looking Glass, and
What We Found There
Project Verde
• 2007
“Early”
Hekaton
• 2009/2010
Hekaton
becomes In-
Memory OLTP
• SQL Server 2014
In-Memory
OLTP
Unleashed
• SQL Server 2016
XTP = eXtreme Transaction Processing
HK = Hekaton
“Feels” like normal disk-based tables
but in memory
Internally completely different
Hash or non-clustered index choices
(at least one required)
Create a Memory
Optimized
FILEGROUP
Decide on an
index strategy
Create a
Memory-
Optimized Table
Create a natively
compiled stored
procedure
Start running
transactions
Tune and
manage
• Estimating Table, Index, Versioning, and Growth. Read here
Do I have enough
Memory?
• Hash = unique row lookup
• Non-clustered = range lookups (also called range index)
Hash or Non-clustered
index?
• SCHEMA_ONLY = Does not persist server restarts; No I/O (even log)
• SCHEMA_AND_DATA = Persists server restartsDurability
• Ultimate speed vs some limits
• Limited diagnostics by default
Use Natively Compiled
Stored Procedures?
• Transaction Log - Transactions only as fast as commit speed
• FILEGROUP – One or multiple folders across drives for faster startupPhysical File Placement
NVDIMM
Transaction Performance Analysis Report
Memory Optimization Advisor
Native Compilation Advisor
Analyze based
on DMVs
Recommend
changes
Find
incompatibilities
Migrate schema,
data, and procs
• Locks the table
• Maintain indexes
• Used to maintain bucketcount for hash indexes
• Natively Compled Procedures are SCHEMABOUND
ALTER memory
optimized tables
• Auto Update statistics supported (requires db compat level = 130)
• Natively Compiled Stored Procedures not recompiled on auto status update
Maintaining
Statistics
• Need to reduce space? Delete rows or drop tables
• Bind to your own RG resource pool with sp_xtp_bind_db_resource_pool
Managing
Memory Usage
Always On Availability Groups
HTAP applications
Azure SQL Database
Cross container transactions
Table variables
here
BACKUP/RESTORE
Immutable
• Rows never change: UPDATE =
DELETE + INSERT
Versions
• UPDATE and DELETE create
versions
• Timestamps in rows for visibility
and transactions correctness
Optimistic
• Assume no conflicts
• Snapshots + conflict detection
• Guarantee correct transaction
isolation at commit
NOT in
tempdb
Pessimistic
= locks
Errors may occur
Release latches and locks
Update index pages ( more locks and latch )
Modify page
Latch page
Obtain locks
INSERT LOG record
In-Memory OLTP INSERT
Maintain index in
memory
Insert ROW into
memory
COMMIT Transaction = Log
Record and Flush
COMMIT Transaction = Insert
HK Log Record and Flush
Page Split
Sys Tran =
Log Flush
Spinlocks
No index
logging
SCHEMA_ONLY
no logging
No latch
No spinlock
Log truncation eligible
at CHECKPOINT event
No WAL protocol
Typically 128Mb
but can be 1Gb
Typically 8Mb but
can be 128Mb
Read details from
database Boot Page
(DBINFO)
Load ROOT file for
system tables and
file metadata
Load ACTIVE DATA
files filtered by
DELTA streamed in
parallel
Redo COMMITED
transactions greater
than last
CHECKPOINT LSN
• SQL Server In-Memory OLTP Internals for SQL Server 2016
• In-Memory OLTP Videos: What it is and When/How to use it
• Explore In-Memory OLTP architectures and customer case studies
• In-Memory OLTP in Azure SQL Database Blog
• In-Memory OLTP (In-Memory Optimization) docs
http://aka.ms/bobwardms
SQL Server In-Memory OLTP: What Every SQL Professional Should Know

Mais conteúdo relacionado

Mais procurados

Gs08 modernize your data platform with sql technologies wash dc
Gs08 modernize your data platform with sql technologies   wash dcGs08 modernize your data platform with sql technologies   wash dc
Gs08 modernize your data platform with sql technologies wash dcBob Ward
 
Connecting Hadoop and Oracle
Connecting Hadoop and OracleConnecting Hadoop and Oracle
Connecting Hadoop and OracleTanel Poder
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder
 
Sql server hybrid what every sql professional should know
Sql server hybrid what every sql professional should knowSql server hybrid what every sql professional should know
Sql server hybrid what every sql professional should knowBob Ward
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBob Ward
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneEnkitec
 
PostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability ImprovementsPostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability ImprovementsPGConf APAC
 
Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]
Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]
Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]ITCamp
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQLlefredbe
 
User Defined Partitioning on PlazmaDB
User Defined Partitioning on PlazmaDBUser Defined Partitioning on PlazmaDB
User Defined Partitioning on PlazmaDBKai Sasaki
 
Relational databases for BigData
Relational databases for BigDataRelational databases for BigData
Relational databases for BigDataAlexander Tokarev
 
P9 speed of-light faceted search via oracle in-memory option by alexander tok...
P9 speed of-light faceted search via oracle in-memory option by alexander tok...P9 speed of-light faceted search via oracle in-memory option by alexander tok...
P9 speed of-light faceted search via oracle in-memory option by alexander tok...Alexander Tokarev
 
Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQL
Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQLCompressed Introduction to Hadoop, SQL-on-Hadoop and NoSQL
Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQLArseny Chernov
 
Big Data and PostgreSQL
Big Data and PostgreSQLBig Data and PostgreSQL
Big Data and PostgreSQLPGConf APAC
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Gabriele Bartolini
 
Query Parallelism in PostgreSQL: What's coming next?
Query Parallelism in PostgreSQL: What's coming next?Query Parallelism in PostgreSQL: What's coming next?
Query Parallelism in PostgreSQL: What's coming next?PGConf APAC
 
SQL Server Optimization Checklist
SQL Server Optimization ChecklistSQL Server Optimization Checklist
SQL Server Optimization ChecklistGrant Fritchey
 
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)Bob Ward
 

Mais procurados (20)

Gs08 modernize your data platform with sql technologies wash dc
Gs08 modernize your data platform with sql technologies   wash dcGs08 modernize your data platform with sql technologies   wash dc
Gs08 modernize your data platform with sql technologies wash dc
 
Connecting Hadoop and Oracle
Connecting Hadoop and OracleConnecting Hadoop and Oracle
Connecting Hadoop and Oracle
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 
Cloud DWH deep dive
Cloud DWH deep diveCloud DWH deep dive
Cloud DWH deep dive
 
Sql server hybrid what every sql professional should know
Sql server hybrid what every sql professional should knowSql server hybrid what every sql professional should know
Sql server hybrid what every sql professional should know
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and docker
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
 
PostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability ImprovementsPostgreSQL 9.6 Performance-Scalability Improvements
PostgreSQL 9.6 Performance-Scalability Improvements
 
Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]
Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]
Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]
 
Loadays MySQL
Loadays MySQLLoadays MySQL
Loadays MySQL
 
User Defined Partitioning on PlazmaDB
User Defined Partitioning on PlazmaDBUser Defined Partitioning on PlazmaDB
User Defined Partitioning on PlazmaDB
 
Relational databases for BigData
Relational databases for BigDataRelational databases for BigData
Relational databases for BigData
 
Really Big Elephants: PostgreSQL DW
Really Big Elephants: PostgreSQL DWReally Big Elephants: PostgreSQL DW
Really Big Elephants: PostgreSQL DW
 
P9 speed of-light faceted search via oracle in-memory option by alexander tok...
P9 speed of-light faceted search via oracle in-memory option by alexander tok...P9 speed of-light faceted search via oracle in-memory option by alexander tok...
P9 speed of-light faceted search via oracle in-memory option by alexander tok...
 
Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQL
Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQLCompressed Introduction to Hadoop, SQL-on-Hadoop and NoSQL
Compressed Introduction to Hadoop, SQL-on-Hadoop and NoSQL
 
Big Data and PostgreSQL
Big Data and PostgreSQLBig Data and PostgreSQL
Big Data and PostgreSQL
 
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
Agile Oracle to PostgreSQL migrations (PGConf.EU 2013)
 
Query Parallelism in PostgreSQL: What's coming next?
Query Parallelism in PostgreSQL: What's coming next?Query Parallelism in PostgreSQL: What's coming next?
Query Parallelism in PostgreSQL: What's coming next?
 
SQL Server Optimization Checklist
SQL Server Optimization ChecklistSQL Server Optimization Checklist
SQL Server Optimization Checklist
 
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
Brk2045 upgrade sql server 2017 (on prem, iaa-s and paas)
 

Destaque

Brk3043 azure sql db intelligent cloud database for app developers - wash dc
Brk3043 azure sql db   intelligent cloud database for app developers - wash dcBrk3043 azure sql db   intelligent cloud database for app developers - wash dc
Brk3043 azure sql db intelligent cloud database for app developers - wash dcBob Ward
 
портфолио голубович
портфолио голубовичпортфолио голубович
портфолио голубовичgolubovicholga
 
Context Based Learning for GIS: an Interdisciplinary Approach
Context Based Learning for GIS: an Interdisciplinary ApproachContext Based Learning for GIS: an Interdisciplinary Approach
Context Based Learning for GIS: an Interdisciplinary ApproachPatrick Rickles
 
Psicopedagoga rj.com.br Cadastro
Psicopedagoga rj.com.br   CadastroPsicopedagoga rj.com.br   Cadastro
Psicopedagoga rj.com.br CadastroPsicopedagogaRJ
 
Pre Production (Planning)
Pre Production (Planning)Pre Production (Planning)
Pre Production (Planning)Rahul Karavadra
 
Copia de resumen qué son los mapas conceptuales.doc%0 a
Copia de resumen qué son los mapas conceptuales.doc%0 aCopia de resumen qué son los mapas conceptuales.doc%0 a
Copia de resumen qué son los mapas conceptuales.doc%0 anoeliavillar
 
Creep Coursework Presentation
Creep Coursework PresentationCreep Coursework Presentation
Creep Coursework Presentationkess1a
 
Continuous Delivery at Oracle Database Insights
Continuous Delivery at Oracle Database InsightsContinuous Delivery at Oracle Database Insights
Continuous Delivery at Oracle Database InsightsMichael Medin
 
Using puppet to leverage DevOps in Large Enterprise Oracle Environments
Using puppet to leverage DevOps in Large Enterprise Oracle Environments Using puppet to leverage DevOps in Large Enterprise Oracle Environments
Using puppet to leverage DevOps in Large Enterprise Oracle Environments Bert Hajee
 
Edition Based Redefinition - Continuous Database Application Evolution with O...
Edition Based Redefinition - Continuous Database Application Evolution with O...Edition Based Redefinition - Continuous Database Application Evolution with O...
Edition Based Redefinition - Continuous Database Application Evolution with O...Lucas Jellema
 
Nature and animal conservation by art
Nature and animal conservation by artNature and animal conservation by art
Nature and animal conservation by artART Raviteja akarapu
 
Continuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database ObjectsContinuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database ObjectsPrabhu Ramasamy
 
Twenty is Plenty
Twenty is PlentyTwenty is Plenty
Twenty is PlentyBob Ward
 
Qué fue el holocausto judío
Qué fue el holocausto judío Qué fue el holocausto judío
Qué fue el holocausto judío Yamila Valdez
 
Continuous Integration for Oracle Database Development
Continuous Integration for Oracle Database DevelopmentContinuous Integration for Oracle Database Development
Continuous Integration for Oracle Database DevelopmentVladimir Bakhov
 

Destaque (20)

Brk3043 azure sql db intelligent cloud database for app developers - wash dc
Brk3043 azure sql db   intelligent cloud database for app developers - wash dcBrk3043 azure sql db   intelligent cloud database for app developers - wash dc
Brk3043 azure sql db intelligent cloud database for app developers - wash dc
 
Otimizando a performance com in memory no sql 2016
Otimizando a performance com in memory no sql 2016Otimizando a performance com in memory no sql 2016
Otimizando a performance com in memory no sql 2016
 
портфолио голубович
портфолио голубовичпортфолио голубович
портфолио голубович
 
Context Based Learning for GIS: an Interdisciplinary Approach
Context Based Learning for GIS: an Interdisciplinary ApproachContext Based Learning for GIS: an Interdisciplinary Approach
Context Based Learning for GIS: an Interdisciplinary Approach
 
Portfolio Draft
Portfolio DraftPortfolio Draft
Portfolio Draft
 
CopyofAResume
CopyofAResumeCopyofAResume
CopyofAResume
 
Psicopedagoga rj.com.br Cadastro
Psicopedagoga rj.com.br   CadastroPsicopedagoga rj.com.br   Cadastro
Psicopedagoga rj.com.br Cadastro
 
Pre Production (Planning)
Pre Production (Planning)Pre Production (Planning)
Pre Production (Planning)
 
Copia de resumen qué son los mapas conceptuales.doc%0 a
Copia de resumen qué son los mapas conceptuales.doc%0 aCopia de resumen qué son los mapas conceptuales.doc%0 a
Copia de resumen qué son los mapas conceptuales.doc%0 a
 
Creep Coursework Presentation
Creep Coursework PresentationCreep Coursework Presentation
Creep Coursework Presentation
 
Continuous Delivery at Oracle Database Insights
Continuous Delivery at Oracle Database InsightsContinuous Delivery at Oracle Database Insights
Continuous Delivery at Oracle Database Insights
 
Using puppet to leverage DevOps in Large Enterprise Oracle Environments
Using puppet to leverage DevOps in Large Enterprise Oracle Environments Using puppet to leverage DevOps in Large Enterprise Oracle Environments
Using puppet to leverage DevOps in Large Enterprise Oracle Environments
 
Edition Based Redefinition - Continuous Database Application Evolution with O...
Edition Based Redefinition - Continuous Database Application Evolution with O...Edition Based Redefinition - Continuous Database Application Evolution with O...
Edition Based Redefinition - Continuous Database Application Evolution with O...
 
Nature and animal conservation by art
Nature and animal conservation by artNature and animal conservation by art
Nature and animal conservation by art
 
Continuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database ObjectsContinuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database Objects
 
ckitterman resume
ckitterman resumeckitterman resume
ckitterman resume
 
Twenty is Plenty
Twenty is PlentyTwenty is Plenty
Twenty is Plenty
 
Qué fue el holocausto judío
Qué fue el holocausto judío Qué fue el holocausto judío
Qué fue el holocausto judío
 
Accounting concepts
Accounting conceptsAccounting concepts
Accounting concepts
 
Continuous Integration for Oracle Database Development
Continuous Integration for Oracle Database DevelopmentContinuous Integration for Oracle Database Development
Continuous Integration for Oracle Database Development
 

Semelhante a SQL Server In-Memory OLTP: What Every SQL Professional Should Know

Novedades SQL Server 2014
Novedades SQL Server 2014Novedades SQL Server 2014
Novedades SQL Server 2014netmind
 
SQL Server 2014 Mission Critical Performance - Level 300 Presentation
SQL Server 2014 Mission Critical Performance - Level 300 PresentationSQL Server 2014 Mission Critical Performance - Level 300 Presentation
SQL Server 2014 Mission Critical Performance - Level 300 PresentationDavid J Rosenthal
 
Sql Server 2014 In Memory
Sql Server 2014 In MemorySql Server 2014 In Memory
Sql Server 2014 In MemoryRavi Okade
 
Hekaton introduction for .Net developers
Hekaton introduction for .Net developersHekaton introduction for .Net developers
Hekaton introduction for .Net developersShy Engelberg
 
Business Insight 2014 - Microsofts nye BI og database platform - Erling Skaal...
Business Insight 2014 - Microsofts nye BI og database platform - Erling Skaal...Business Insight 2014 - Microsofts nye BI og database platform - Erling Skaal...
Business Insight 2014 - Microsofts nye BI og database platform - Erling Skaal...Microsoft
 
In-memory ColumnStore Index
In-memory ColumnStore IndexIn-memory ColumnStore Index
In-memory ColumnStore IndexSolidQ
 
JSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningJSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningKenichiro Nakamura
 
Always On Availability Group Maintenance Operations
Always On Availability Group Maintenance OperationsAlways On Availability Group Maintenance Operations
Always On Availability Group Maintenance OperationsJohn Martin
 
Designing High Performance ETL for Data Warehouse
Designing High Performance ETL for Data WarehouseDesigning High Performance ETL for Data Warehouse
Designing High Performance ETL for Data WarehouseMarcel Franke
 
Sql2017 in memory oltp for developers
Sql2017 in memory oltp for developersSql2017 in memory oltp for developers
Sql2017 in memory oltp for developersRico Chen
 
World-class Data Engineering with Amazon Redshift
World-class Data Engineering with Amazon RedshiftWorld-class Data Engineering with Amazon Redshift
World-class Data Engineering with Amazon RedshiftLars Kamp
 
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...javier ramirez
 
SQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTPSQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTPTony Rogerson
 
Sql server 2014 what's new-
Sql server 2014  what's new-Sql server 2014  what's new-
Sql server 2014 what's new-Stuart Ainsworth
 
Functional? Reactive? Why?
Functional? Reactive? Why?Functional? Reactive? Why?
Functional? Reactive? Why?Aleksandr Tavgen
 
Optimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointOptimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointserge luca
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsSteve Knutson
 
Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016Niko Neugebauer
 
SQL Server In-Memory OLTP Migration Overview
SQL Server In-Memory OLTP Migration OverviewSQL Server In-Memory OLTP Migration Overview
SQL Server In-Memory OLTP Migration OverviewJose Rivera Miranda
 
SQL 2014 In-Memory OLTP
SQL 2014 In-Memory  OLTPSQL 2014 In-Memory  OLTP
SQL 2014 In-Memory OLTPAmber Keyse
 

Semelhante a SQL Server In-Memory OLTP: What Every SQL Professional Should Know (20)

Novedades SQL Server 2014
Novedades SQL Server 2014Novedades SQL Server 2014
Novedades SQL Server 2014
 
SQL Server 2014 Mission Critical Performance - Level 300 Presentation
SQL Server 2014 Mission Critical Performance - Level 300 PresentationSQL Server 2014 Mission Critical Performance - Level 300 Presentation
SQL Server 2014 Mission Critical Performance - Level 300 Presentation
 
Sql Server 2014 In Memory
Sql Server 2014 In MemorySql Server 2014 In Memory
Sql Server 2014 In Memory
 
Hekaton introduction for .Net developers
Hekaton introduction for .Net developersHekaton introduction for .Net developers
Hekaton introduction for .Net developers
 
Business Insight 2014 - Microsofts nye BI og database platform - Erling Skaal...
Business Insight 2014 - Microsofts nye BI og database platform - Erling Skaal...Business Insight 2014 - Microsofts nye BI og database platform - Erling Skaal...
Business Insight 2014 - Microsofts nye BI og database platform - Erling Skaal...
 
In-memory ColumnStore Index
In-memory ColumnStore IndexIn-memory ColumnStore Index
In-memory ColumnStore Index
 
JSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningJSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance Tuning
 
Always On Availability Group Maintenance Operations
Always On Availability Group Maintenance OperationsAlways On Availability Group Maintenance Operations
Always On Availability Group Maintenance Operations
 
Designing High Performance ETL for Data Warehouse
Designing High Performance ETL for Data WarehouseDesigning High Performance ETL for Data Warehouse
Designing High Performance ETL for Data Warehouse
 
Sql2017 in memory oltp for developers
Sql2017 in memory oltp for developersSql2017 in memory oltp for developers
Sql2017 in memory oltp for developers
 
World-class Data Engineering with Amazon Redshift
World-class Data Engineering with Amazon RedshiftWorld-class Data Engineering with Amazon Redshift
World-class Data Engineering with Amazon Redshift
 
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
Cómo se diseña una base de datos que pueda ingerir más de cuatro millones de ...
 
SQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTPSQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTP
 
Sql server 2014 what's new-
Sql server 2014  what's new-Sql server 2014  what's new-
Sql server 2014 what's new-
 
Functional? Reactive? Why?
Functional? Reactive? Why?Functional? Reactive? Why?
Functional? Reactive? Why?
 
Optimize SQL server performance for SharePoint
Optimize SQL server performance for SharePointOptimize SQL server performance for SharePoint
Optimize SQL server performance for SharePoint
 
Introduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAsIntroduction to SharePoint for SQLserver DBAs
Introduction to SharePoint for SQLserver DBAs
 
Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016
 
SQL Server In-Memory OLTP Migration Overview
SQL Server In-Memory OLTP Migration OverviewSQL Server In-Memory OLTP Migration Overview
SQL Server In-Memory OLTP Migration Overview
 
SQL 2014 In-Memory OLTP
SQL 2014 In-Memory  OLTPSQL 2014 In-Memory  OLTP
SQL 2014 In-Memory OLTP
 

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 

Último (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 

SQL Server In-Memory OLTP: What Every SQL Professional Should Know

  • 2. How do I use this? Based on SQL Server 2016
  • 4. OLTP Through the Looking Glass, and What We Found There
  • 5. Project Verde • 2007 “Early” Hekaton • 2009/2010 Hekaton becomes In- Memory OLTP • SQL Server 2014 In-Memory OLTP Unleashed • SQL Server 2016
  • 6. XTP = eXtreme Transaction Processing HK = Hekaton
  • 7.
  • 8. “Feels” like normal disk-based tables but in memory Internally completely different Hash or non-clustered index choices (at least one required)
  • 9.
  • 10.
  • 11. Create a Memory Optimized FILEGROUP Decide on an index strategy Create a Memory- Optimized Table Create a natively compiled stored procedure Start running transactions Tune and manage
  • 12. • Estimating Table, Index, Versioning, and Growth. Read here Do I have enough Memory? • Hash = unique row lookup • Non-clustered = range lookups (also called range index) Hash or Non-clustered index? • SCHEMA_ONLY = Does not persist server restarts; No I/O (even log) • SCHEMA_AND_DATA = Persists server restartsDurability • Ultimate speed vs some limits • Limited diagnostics by default Use Natively Compiled Stored Procedures? • Transaction Log - Transactions only as fast as commit speed • FILEGROUP – One or multiple folders across drives for faster startupPhysical File Placement NVDIMM
  • 13. Transaction Performance Analysis Report Memory Optimization Advisor Native Compilation Advisor Analyze based on DMVs Recommend changes Find incompatibilities Migrate schema, data, and procs
  • 14.
  • 15.
  • 16. • Locks the table • Maintain indexes • Used to maintain bucketcount for hash indexes • Natively Compled Procedures are SCHEMABOUND ALTER memory optimized tables • Auto Update statistics supported (requires db compat level = 130) • Natively Compiled Stored Procedures not recompiled on auto status update Maintaining Statistics • Need to reduce space? Delete rows or drop tables • Bind to your own RG resource pool with sp_xtp_bind_db_resource_pool Managing Memory Usage
  • 17. Always On Availability Groups HTAP applications Azure SQL Database Cross container transactions Table variables here BACKUP/RESTORE
  • 18.
  • 19. Immutable • Rows never change: UPDATE = DELETE + INSERT Versions • UPDATE and DELETE create versions • Timestamps in rows for visibility and transactions correctness Optimistic • Assume no conflicts • Snapshots + conflict detection • Guarantee correct transaction isolation at commit NOT in tempdb Pessimistic = locks Errors may occur
  • 20. Release latches and locks Update index pages ( more locks and latch ) Modify page Latch page Obtain locks INSERT LOG record In-Memory OLTP INSERT Maintain index in memory Insert ROW into memory COMMIT Transaction = Log Record and Flush COMMIT Transaction = Insert HK Log Record and Flush Page Split Sys Tran = Log Flush Spinlocks No index logging SCHEMA_ONLY no logging No latch No spinlock
  • 21. Log truncation eligible at CHECKPOINT event No WAL protocol Typically 128Mb but can be 1Gb Typically 8Mb but can be 128Mb Read details from database Boot Page (DBINFO) Load ROOT file for system tables and file metadata Load ACTIVE DATA files filtered by DELTA streamed in parallel Redo COMMITED transactions greater than last CHECKPOINT LSN
  • 22.
  • 23. • SQL Server In-Memory OLTP Internals for SQL Server 2016 • In-Memory OLTP Videos: What it is and When/How to use it • Explore In-Memory OLTP architectures and customer case studies • In-Memory OLTP in Azure SQL Database Blog • In-Memory OLTP (In-Memory Optimization) docs http://aka.ms/bobwardms

Notas do Editor

  1. Use the instructions in readme.md in demo1_just_show_us
  2. Notice that log records are not even created until COMMIT.