SlideShare a Scribd company logo
SQL 2014 In-
Memory OLTP
Amber Keyse
Database Administrator
Email: hantsuksqlserverusergroup@gmail.com
20th October
Why now?
• Increase in memory capacity.
• Increasing number of cores available in processor(s).
In-Memory OLTP data
processing types available in
market
• The 2 main types:
• Main-memory databases
• Application caches or key-value stores
What is SQL In-Memory OLTP?
• New feature in SQL 2014.
• Integrated within the SQL Server engine.
• Designed to improve SQL performance.
• Enable users to create data in memory optimized tables and
indexes in RAM.
• Available in SSMS and TSQL.
• It uses filestream filegroup(s). Reading and writing to this file
is sequential.
• An update is implemented as a delete followed by an insert.
The deleted rows are removed using MERGE background
process.
2 SQL In-Memory OLTP main
data structures
• Memory -optimized tables and indexes
• Natively -compiled stored procedures
In-Memory OLTP
Architecture
• In-Memory is integrated into SQL
Engine.
• Clients connect to TDS handler
and Session Management for
memory optimized and disk based
tables. Also for natively compile
and T-SQL stored procedures.
• Query Interop enables
interpreted T-SQL and stored
procedures use memory
optimized tables.
• Native compiler creates an
abstract tree to represent T-SQL
sp.
• Storage Engine manages user data
and indexes for memory
optimized tables.
Diagram and info from:
https://www.mssqltips.com/sqlservertip/31
06/sql-server-2014-inmemory-oltp-
architecture-and-data-storage
SQL In-Memory OLTP
Architecture –Data Storage
• Disk based data row
structure
• Row data stored In-
Memory structure
Diagrams from
https://technet.microsoft.com/en-
us/library/ms190969(v=sql.105).aspx
Diagram from
https://www.mssqltips.com/sqlservertip/3106
/sql-server-2014-inmemory-oltp-
architecture-and-data-storage/
Durability options in SQL In-
Memory OLTP
• SCHEMA_ONLY
• SCHEMA_AND_DATA
Advantages of SQL In-Memory
OLTP
• Speed!
• ACID Support.
• Integrated into SQL Instance.
• User databases can contain both In-Memory OLTP and disk
based schemas.
• Available in SQL On premise and Azure SQL databases.
• SQL Support and Manageability tools provided.
Disadvantages of SQL In-
Memory OLTP
• Very new.
• Tricky to troubleshoot future performance problems.
• Sharing RAM with SQL Instance.
• Limited SQL object support.
• RAM requirement.
Possible suitable workload
• Lock or latch contention.
• Excessive page I/O, latch waits or waits reading from or
writing to disk
• Transaction Logging.
• Hardware resource limitations.
• High volume of INSERTS and SELECTs
• CPU-intensive operations
• Extremely fast business transactions
• Session state management
Demo - Implement In-Memory
in Management studio
SQL Support and
Manageability –AMR tool
• Integrated into SSMS.
• Designed to help identify which tables and stored procedures
will benefit the most from In-Memory OLTP.
• AMR tool consists of;
• Transaction performance collector
• Memory Optimization Advisor
• Native Compilation Advisor
AMR – Transaction
Performance Collector
• Collects information about the SQL Instance workload.
• Imports the data to a Management Data Warehouse.
• The collection sets include;
• Stored procedure usage analysis
• Table usage analysis
Demo – Transaction
Performance Collector
AMR – Memory Optimization
Advisor
• Provides a Wizard within SSMS.
• Starts with reviewing table(s) you could migrate.
• Reports any violation errors for disk-based tables.
• Identify changes required to convert table to In-Memory OLTP
table.
• Generate code to migrate the table and/or migrate table for
you.
Demo – Using Memory
Optimization Advisor
AMR – Native Compilation
Advisor
• Integrated into SSMS.
• Provides advise about what should be changed in a stored
procedure.
• Gives a Wizard and generated a report.
• It relies on the DBA to rewrite or update the sp.
Demo - Native Compilation
Advisor
Calculate RAM for In-
Memory
Size of the Table + Sum of all Index sizes + row versioning
• Only estimate for initial size.
• What about next 18 months?
• Need to estimate RAM requirement for other SQL
Instance transactions.
• Example calculation from
http://thomaslarock.com/2014/06/estimating-memory-
requirements-in-sql-server-2014/
Configure Memory Quota for In-
Memory Optimized Dbs
From https://www.mssqltips.com/sqlservertip/3368/setup-a-memory-
quota-for-sql-server-memory-optimized-databases/
The sys.dm_os_sys_info DMV
Demo Set Memory Quota for In-
Memory Optimized Dbs
Further reading
• Free Redgate PDF version of SQL Server Internals - In Memory OLTP by Kalen Delaney: https://www.red-
gate.com/library/sql-server-internals-in-memory-oltp
• Disadvantages of In-Memory OLTP by Klaus Aschenbrenner, published 2015:
http://www.sqlpassion.at/archive/2015/03/11/dont-yet-recommend-memory-oltp-customers/
• Microsoft SQL Server Team – Getting Started with SQL Server 2014 In-Memory OLTP:
https://blogs.technet.microsoft.com/dataplatforminsider/2013/06/26/getting-started-with-sql-server-
2014-in-memory-oltp/
• Comparing Disk-Based Table Storage to Memory-Optimized Table Storage:
https://msdn.microsoft.com/en-us/library/dn553126(v=sql.120).aspx
• Defining Durability for Memory-Optimized Objects: https://msdn.microsoft.com/en-
us/library/dn553122(v=sql.120).aspx
• Demo steps for using Azure In-Memory OLTP for Azure SQL DB by Channel 9:
https://channel9.msdn.com/Shows/Data-Exposed/In-Memory-OLTP-for-Azure-SQL-DB
• Determine which tables and sps would benefit from In-Memory OLTP: http://sqlmag.com/sql-server-
2014/sql-server-2014-analysis-migrate-report-tool-amr
• Microsoft Memory Optimization Advisor: https://msdn.microsoft.com/en-
gb/library/dn284308(v=sql.120).aspx
• SQL Server 2014 CTP2 –Memory Optimization Advisor: https://www.pythian.com/blog/sql-server-2014-
ctp2-memory-optimization-advisor
• In-Memory Native compilation Advisor in SSMS: http://sqlserver-help.com/tag/native-compilation-
advisor/
• Estimate Memory requirement: http://thomaslarock.com/2014/06/estimating-memory-requirements-in-
sql-server-2014/
• Delete a Resource Pool: https://msdn.microsoft.com/en-us/library/hh510193(v=sql.120).aspx
Questions
Ad

More Related Content

What's hot (20)

Configuring Sage 500 for Performance
Configuring Sage 500 for PerformanceConfiguring Sage 500 for Performance
Configuring Sage 500 for Performance
RKLeSolutions
 
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
SolarWinds
 
4. (mjk) extreme performance 2
4. (mjk) extreme performance 24. (mjk) extreme performance 2
4. (mjk) extreme performance 2
Doina Draganescu
 
X-DB Replication Server and MMR
X-DB Replication Server and MMRX-DB Replication Server and MMR
X-DB Replication Server and MMR
Ashnikbiz
 
Optimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best PracticesOptimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best Practices
EDB
 
Tips and Tricks for SAP Sybase IQ
Tips and Tricks for SAP  Sybase IQTips and Tricks for SAP  Sybase IQ
Tips and Tricks for SAP Sybase IQ
Don Brizendine
 
Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017
EDB
 
Maximum Availability Architecture with Fusion Middleware 12c and Oracle Datab...
Maximum Availability Architecture with Fusion Middleware 12c and Oracle Datab...Maximum Availability Architecture with Fusion Middleware 12c and Oracle Datab...
Maximum Availability Architecture with Fusion Middleware 12c and Oracle Datab...
Nikitas Xenakis
 
Performance dreams of sql server 2014
Performance dreams of sql server 2014Performance dreams of sql server 2014
Performance dreams of sql server 2014
Shehap Elnagar
 
Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs
Antonios Chatzipavlis
 
Manageability Enhancements of SQL Server 2012
Manageability Enhancements of SQL Server 2012Manageability Enhancements of SQL Server 2012
Manageability Enhancements of SQL Server 2012
Microsoft TechNet - Belgium and Luxembourg
 
Using flash on the server side
Using flash on the server sideUsing flash on the server side
Using flash on the server side
Howard Marks
 
Sql2017 in memory oltp for developers
Sql2017 in memory oltp for developersSql2017 in memory oltp for developers
Sql2017 in memory oltp for developers
Rico Chen
 
Optimize MySQL performance for developers
Optimize MySQL performance for developersOptimize MySQL performance for developers
Optimize MySQL performance for developers
jackbillow
 
AUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePointAUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePoint
Michael Noel
 
EnterpriseDB's Best Practices for Postgres DBAs
EnterpriseDB's Best Practices for Postgres DBAsEnterpriseDB's Best Practices for Postgres DBAs
EnterpriseDB's Best Practices for Postgres DBAs
EDB
 
Postgresql in Education
Postgresql in EducationPostgresql in Education
Postgresql in Education
dostatni
 
EnterpriseDB BackUp and Recovery Tool
EnterpriseDB BackUp and Recovery ToolEnterpriseDB BackUp and Recovery Tool
EnterpriseDB BackUp and Recovery Tool
EDB
 
Introducing Postgres Plus Advanced Server 9.4
Introducing Postgres Plus Advanced Server 9.4Introducing Postgres Plus Advanced Server 9.4
Introducing Postgres Plus Advanced Server 9.4
EDB
 
SQL Server Memory Pressure
SQL Server Memory PressureSQL Server Memory Pressure
SQL Server Memory Pressure
Hamid J. Fard
 
Configuring Sage 500 for Performance
Configuring Sage 500 for PerformanceConfiguring Sage 500 for Performance
Configuring Sage 500 for Performance
RKLeSolutions
 
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
Hi! Ho! Hi! Ho! SQL Server on Linux We Go!
SolarWinds
 
4. (mjk) extreme performance 2
4. (mjk) extreme performance 24. (mjk) extreme performance 2
4. (mjk) extreme performance 2
Doina Draganescu
 
X-DB Replication Server and MMR
X-DB Replication Server and MMRX-DB Replication Server and MMR
X-DB Replication Server and MMR
Ashnikbiz
 
Optimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best PracticesOptimizing Your Postgres ROI Through Best Practices
Optimizing Your Postgres ROI Through Best Practices
EDB
 
Tips and Tricks for SAP Sybase IQ
Tips and Tricks for SAP  Sybase IQTips and Tricks for SAP  Sybase IQ
Tips and Tricks for SAP Sybase IQ
Don Brizendine
 
Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017Product Update: EDB Postgres Platform 2017
Product Update: EDB Postgres Platform 2017
EDB
 
Maximum Availability Architecture with Fusion Middleware 12c and Oracle Datab...
Maximum Availability Architecture with Fusion Middleware 12c and Oracle Datab...Maximum Availability Architecture with Fusion Middleware 12c and Oracle Datab...
Maximum Availability Architecture with Fusion Middleware 12c and Oracle Datab...
Nikitas Xenakis
 
Performance dreams of sql server 2014
Performance dreams of sql server 2014Performance dreams of sql server 2014
Performance dreams of sql server 2014
Shehap Elnagar
 
Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs Building diagnostic queries using DMVs and DMFs
Building diagnostic queries using DMVs and DMFs
Antonios Chatzipavlis
 
Using flash on the server side
Using flash on the server sideUsing flash on the server side
Using flash on the server side
Howard Marks
 
Sql2017 in memory oltp for developers
Sql2017 in memory oltp for developersSql2017 in memory oltp for developers
Sql2017 in memory oltp for developers
Rico Chen
 
Optimize MySQL performance for developers
Optimize MySQL performance for developersOptimize MySQL performance for developers
Optimize MySQL performance for developers
jackbillow
 
AUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePointAUSPC 2013 - Business Continuity Management in SharePoint
AUSPC 2013 - Business Continuity Management in SharePoint
Michael Noel
 
EnterpriseDB's Best Practices for Postgres DBAs
EnterpriseDB's Best Practices for Postgres DBAsEnterpriseDB's Best Practices for Postgres DBAs
EnterpriseDB's Best Practices for Postgres DBAs
EDB
 
Postgresql in Education
Postgresql in EducationPostgresql in Education
Postgresql in Education
dostatni
 
EnterpriseDB BackUp and Recovery Tool
EnterpriseDB BackUp and Recovery ToolEnterpriseDB BackUp and Recovery Tool
EnterpriseDB BackUp and Recovery Tool
EDB
 
Introducing Postgres Plus Advanced Server 9.4
Introducing Postgres Plus Advanced Server 9.4Introducing Postgres Plus Advanced Server 9.4
Introducing Postgres Plus Advanced Server 9.4
EDB
 
SQL Server Memory Pressure
SQL Server Memory PressureSQL Server Memory Pressure
SQL Server Memory Pressure
Hamid J. Fard
 

Viewers also liked (18)

SQL Track: In Memory OLTP in SQL Server
SQL Track: In Memory OLTP in SQL ServerSQL Track: In Memory OLTP in SQL Server
SQL Track: In Memory OLTP in SQL Server
ITProceed
 
In memory OLTP
In memory OLTPIn memory OLTP
In memory OLTP
Hyungkwon Joo
 
Eca Ilustrado
Eca IlustradoEca Ilustrado
Eca Ilustrado
ACECTALCT
 
Brenda torres
Brenda torresBrenda torres
Brenda torres
Brenda torres
 
Alice Kellaway work
Alice Kellaway workAlice Kellaway work
Alice Kellaway work
Alice Kellaway
 
Some Training Certificates
Some Training CertificatesSome Training Certificates
Some Training Certificates
Abdul-Sattar Al-Mashhadani
 
Fauna mexicana bien
Fauna mexicana bienFauna mexicana bien
Fauna mexicana bien
Lucía Escalera
 
Vegetation Plan
Vegetation PlanVegetation Plan
Vegetation Plan
Anna Drexler-Dreis
 
hydrogen powered car and its application and its parts working
hydrogen powered car and its application and its parts workinghydrogen powered car and its application and its parts working
hydrogen powered car and its application and its parts working
Hemanth kumar
 
TALLER AUTODIAGNÓSTICO
TALLER AUTODIAGNÓSTICOTALLER AUTODIAGNÓSTICO
TALLER AUTODIAGNÓSTICO
sofiahenao200210
 
Fernando dafonte
Fernando dafonteFernando dafonte
Fernando dafonte
fernando dafonte
 
Spectrum presentation
Spectrum presentationSpectrum presentation
Spectrum presentation
Investors Orbit
 
descripción
descripción descripción
descripción
Eliana Grajales
 
Power point tice
Power point ticePower point tice
Power point tice
juliana daoud
 
Net and protection
Net and protectionNet and protection
Net and protection
Bishwas Kafle
 
Template 2-customer
Template 2-customerTemplate 2-customer
Template 2-customer
Серикхан Сансызбаев
 
Moral casais juan_francisco_lu2_tarea_global2
Moral casais juan_francisco_lu2_tarea_global2Moral casais juan_francisco_lu2_tarea_global2
Moral casais juan_francisco_lu2_tarea_global2
juan moral
 
Pillars for Carolina 2014 One Year Marketing Plan
Pillars for Carolina 2014 One Year Marketing PlanPillars for Carolina 2014 One Year Marketing Plan
Pillars for Carolina 2014 One Year Marketing Plan
Camden Wiggins
 
Ad

Similar to SQL 2014 In-Memory OLTP (20)

Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock Holmes
Richard Douglas
 
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Denny Lee
 
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
 
Performance tuning in sql server
Performance tuning in sql serverPerformance tuning in sql server
Performance tuning in sql server
Antonios Chatzipavlis
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
Antonios Chatzipavlis
 
Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502
kaziul Islam Bulbul
 
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL ServerGeek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
IDERA Software
 
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su AzureSql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Marco Obinu
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
collab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdfcollab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdf
ElboulmaniMohamed
 
Breaking data
Breaking dataBreaking data
Breaking data
Terry Bunio
 
Novedades SQL Server 2014
Novedades SQL Server 2014Novedades SQL Server 2014
Novedades SQL Server 2014
netmind
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
Geir Høydalsvik
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
SPC Adriatics
 
In-memory ColumnStore Index
In-memory ColumnStore IndexIn-memory ColumnStore Index
In-memory ColumnStore Index
SolidQ
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
Mario Beck
 
What SQL DBA's need to know about SharePoint-St. Louis 2013
What SQL DBA's need to know about SharePoint-St. Louis 2013What SQL DBA's need to know about SharePoint-St. Louis 2013
What SQL DBA's need to know about SharePoint-St. Louis 2013
J.D. Wade
 
TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...
TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...
TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...
NetApp
 
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
David J Rosenthal
 
Dynamics ax performance tuning
Dynamics ax performance tuningDynamics ax performance tuning
Dynamics ax performance tuning
OutsourceAX
 
Investigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock HolmesInvestigate SQL Server Memory Like Sherlock Holmes
Investigate SQL Server Memory Like Sherlock Holmes
Richard Douglas
 
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Denny Lee
 
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
 
Pre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctlyPre and post tips to installing sql server correctly
Pre and post tips to installing sql server correctly
Antonios Chatzipavlis
 
Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502Collaborate 2011-tuning-ebusiness-416502
Collaborate 2011-tuning-ebusiness-416502
kaziul Islam Bulbul
 
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL ServerGeek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
IDERA Software
 
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su AzureSql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Marco Obinu
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
 
collab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdfcollab2011-tuning-ebusiness-421966.pdf
collab2011-tuning-ebusiness-421966.pdf
ElboulmaniMohamed
 
Novedades SQL Server 2014
Novedades SQL Server 2014Novedades SQL Server 2014
Novedades SQL Server 2014
netmind
 
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015 2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
2015: Whats New in MySQL 5.7, At Oracle Open World, November 3rd, 2015
Geir Høydalsvik
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
SPC Adriatics
 
In-memory ColumnStore Index
In-memory ColumnStore IndexIn-memory ColumnStore Index
In-memory ColumnStore Index
SolidQ
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
Mario Beck
 
What SQL DBA's need to know about SharePoint-St. Louis 2013
What SQL DBA's need to know about SharePoint-St. Louis 2013What SQL DBA's need to know about SharePoint-St. Louis 2013
What SQL DBA's need to know about SharePoint-St. Louis 2013
J.D. Wade
 
TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...
TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...
TechTarget Event - Storage Architectures for the Modern Data Center - Howard ...
NetApp
 
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
David J Rosenthal
 
Dynamics ax performance tuning
Dynamics ax performance tuningDynamics ax performance tuning
Dynamics ax performance tuning
OutsourceAX
 
Ad

Recently uploaded (20)

What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 

SQL 2014 In-Memory OLTP

  • 1. SQL 2014 In- Memory OLTP Amber Keyse Database Administrator Email: [email protected] 20th October
  • 2. Why now? • Increase in memory capacity. • Increasing number of cores available in processor(s).
  • 3. In-Memory OLTP data processing types available in market • The 2 main types: • Main-memory databases • Application caches or key-value stores
  • 4. What is SQL In-Memory OLTP? • New feature in SQL 2014. • Integrated within the SQL Server engine. • Designed to improve SQL performance. • Enable users to create data in memory optimized tables and indexes in RAM. • Available in SSMS and TSQL. • It uses filestream filegroup(s). Reading and writing to this file is sequential. • An update is implemented as a delete followed by an insert. The deleted rows are removed using MERGE background process.
  • 5. 2 SQL In-Memory OLTP main data structures • Memory -optimized tables and indexes • Natively -compiled stored procedures
  • 6. In-Memory OLTP Architecture • In-Memory is integrated into SQL Engine. • Clients connect to TDS handler and Session Management for memory optimized and disk based tables. Also for natively compile and T-SQL stored procedures. • Query Interop enables interpreted T-SQL and stored procedures use memory optimized tables. • Native compiler creates an abstract tree to represent T-SQL sp. • Storage Engine manages user data and indexes for memory optimized tables. Diagram and info from: https://www.mssqltips.com/sqlservertip/31 06/sql-server-2014-inmemory-oltp- architecture-and-data-storage
  • 7. SQL In-Memory OLTP Architecture –Data Storage • Disk based data row structure • Row data stored In- Memory structure Diagrams from https://technet.microsoft.com/en- us/library/ms190969(v=sql.105).aspx Diagram from https://www.mssqltips.com/sqlservertip/3106 /sql-server-2014-inmemory-oltp- architecture-and-data-storage/
  • 8. Durability options in SQL In- Memory OLTP • SCHEMA_ONLY • SCHEMA_AND_DATA
  • 9. Advantages of SQL In-Memory OLTP • Speed! • ACID Support. • Integrated into SQL Instance. • User databases can contain both In-Memory OLTP and disk based schemas. • Available in SQL On premise and Azure SQL databases. • SQL Support and Manageability tools provided.
  • 10. Disadvantages of SQL In- Memory OLTP • Very new. • Tricky to troubleshoot future performance problems. • Sharing RAM with SQL Instance. • Limited SQL object support. • RAM requirement.
  • 11. Possible suitable workload • Lock or latch contention. • Excessive page I/O, latch waits or waits reading from or writing to disk • Transaction Logging. • Hardware resource limitations. • High volume of INSERTS and SELECTs • CPU-intensive operations • Extremely fast business transactions • Session state management
  • 12. Demo - Implement In-Memory in Management studio
  • 13. SQL Support and Manageability –AMR tool • Integrated into SSMS. • Designed to help identify which tables and stored procedures will benefit the most from In-Memory OLTP. • AMR tool consists of; • Transaction performance collector • Memory Optimization Advisor • Native Compilation Advisor
  • 14. AMR – Transaction Performance Collector • Collects information about the SQL Instance workload. • Imports the data to a Management Data Warehouse. • The collection sets include; • Stored procedure usage analysis • Table usage analysis
  • 16. AMR – Memory Optimization Advisor • Provides a Wizard within SSMS. • Starts with reviewing table(s) you could migrate. • Reports any violation errors for disk-based tables. • Identify changes required to convert table to In-Memory OLTP table. • Generate code to migrate the table and/or migrate table for you.
  • 17. Demo – Using Memory Optimization Advisor
  • 18. AMR – Native Compilation Advisor • Integrated into SSMS. • Provides advise about what should be changed in a stored procedure. • Gives a Wizard and generated a report. • It relies on the DBA to rewrite or update the sp.
  • 19. Demo - Native Compilation Advisor
  • 20. Calculate RAM for In- Memory Size of the Table + Sum of all Index sizes + row versioning • Only estimate for initial size. • What about next 18 months? • Need to estimate RAM requirement for other SQL Instance transactions. • Example calculation from http://thomaslarock.com/2014/06/estimating-memory- requirements-in-sql-server-2014/
  • 21. Configure Memory Quota for In- Memory Optimized Dbs From https://www.mssqltips.com/sqlservertip/3368/setup-a-memory- quota-for-sql-server-memory-optimized-databases/ The sys.dm_os_sys_info DMV
  • 22. Demo Set Memory Quota for In- Memory Optimized Dbs
  • 23. Further reading • Free Redgate PDF version of SQL Server Internals - In Memory OLTP by Kalen Delaney: https://www.red- gate.com/library/sql-server-internals-in-memory-oltp • Disadvantages of In-Memory OLTP by Klaus Aschenbrenner, published 2015: http://www.sqlpassion.at/archive/2015/03/11/dont-yet-recommend-memory-oltp-customers/ • Microsoft SQL Server Team – Getting Started with SQL Server 2014 In-Memory OLTP: https://blogs.technet.microsoft.com/dataplatforminsider/2013/06/26/getting-started-with-sql-server- 2014-in-memory-oltp/ • Comparing Disk-Based Table Storage to Memory-Optimized Table Storage: https://msdn.microsoft.com/en-us/library/dn553126(v=sql.120).aspx • Defining Durability for Memory-Optimized Objects: https://msdn.microsoft.com/en- us/library/dn553122(v=sql.120).aspx • Demo steps for using Azure In-Memory OLTP for Azure SQL DB by Channel 9: https://channel9.msdn.com/Shows/Data-Exposed/In-Memory-OLTP-for-Azure-SQL-DB • Determine which tables and sps would benefit from In-Memory OLTP: http://sqlmag.com/sql-server- 2014/sql-server-2014-analysis-migrate-report-tool-amr • Microsoft Memory Optimization Advisor: https://msdn.microsoft.com/en- gb/library/dn284308(v=sql.120).aspx • SQL Server 2014 CTP2 –Memory Optimization Advisor: https://www.pythian.com/blog/sql-server-2014- ctp2-memory-optimization-advisor • In-Memory Native compilation Advisor in SSMS: http://sqlserver-help.com/tag/native-compilation- advisor/ • Estimate Memory requirement: http://thomaslarock.com/2014/06/estimating-memory-requirements-in- sql-server-2014/ • Delete a Resource Pool: https://msdn.microsoft.com/en-us/library/hh510193(v=sql.120).aspx

Editor's Notes

  • #2: Next user group meetings 20th October. Register interest using the link; https://www.eventbrite.co.uk/e/oct-hants-sql-user-group-meeting-tickets-25771056925?utm_source=eb_email&utm_medium=email&utm_campaign=event_reminder&utm_term=eventname
  • #3: Increase in memory capacity: Rise in 64 bit process and fall in memory prices. Cost per GB of RAM dropped to a few £. Number of cores on processors increasing. The In-Memory data structures designed to use very large number of cores.
  • #4: Other vendors offering In-Memory OLTP data processing. Main-memory databases: Oracle TimesTen, IBM SolidDB, Microsoft SQL Server that target embedded database space. Applications caches or key-value stores: The Velocity, App Fabric Cache and Gigaspaces uses middle-tier memory to offload work from databases by offering transactions, range indexing, query.
  • #5: Pre 2014: Traditional SQL Server engine write 8KB data pages into memory and then back out to disk can incur higher latency cost. SQL was designed originally when memory was expensive and followed the disk-based tables . Used locks and latches to prevent interference between concurrent transaction on the same data rows, thus preserve ACID (Atomic, Consistency, Insolation, Durable) characteristics.
  • #6: 1) Memory -optimized tables and indexes: whole table and its indexes are stored in memory all the time. It is using multiple versions of each row's data. It is characterized as non-blocking multi-version optimistic concurrency control. Eliminates both locks and latches to make it faster. Referred to as MVCC model (Multi-version Concurrency Control) 2) Natively-compiled stored procedures: Only access memory-optimized data structures e.g. memory-optimized tables, table variables. The key features - Rows in table read/written to memory, entire table in memory, Non-blocking multi-version optimistic concurrency control, have option of durable (second copy on disk) & non-durable data, in memory data only read from disk in DR.
  • #8: Disk based Extents: 8 physically contiguous pages or 64 KB. SQL DB has 16 Extents per MB. Each table : Data stored in data or index 8K pages. Each database can contain 128 pages per MB. Each page starts with a 96-byte header, consisting system information about the page (page number, page type, amount of free space, allocated unit ID of object that owns page). A page stores only rows from the same table. DML operation requires page to be loaded into buffer-pool, which resides in RAM. In–Memory data store New row format. Uses multi-version for each record. Rows are stored as individual rows. 2 rows in a data file can belong to different memory optimized tables.
  • #9: SCHEMA_ONLY: (non-durable table): If SQL restarted data is lost as the Schema is recreated to avoid transaction logging and checkpoint reducing I/O operations. SCHEMA_AND_DATA: Durability for schema and data. 2 Levels of data durability available - fully durable or delayed durability. Full durable tables same as the disk-based table. Delay durability is quicker but risk of data loss if server crash/fail over.
  • #10: Speed – 1) Faster data access compared to disk based tables. 2) T-SQL compiled to machine code so fewer instructions/layers so business logic process faster. Full ACID (Atomicity, Consistency, Isolation, Durability) Support – Ensure all database transaction are reliably processed. Obey to process all actions within the transaction or non rule. Integrated into SQL Instance: Can deploy using T-SQL or SSMS for new or existing DBs. SQL Support and Manageability tools provided – 1) Native Compilation Advisor: Shows sps that are incompatible with natively compiled procedures. 2) Resource Governor: Provide ability to set memory quota. 3) Memory usage SSMS standard database report. 4) Metadata Enhancements –Catalogue view enhancements (sys.table and sys.table) and Dynamic Management Objects (sys.dm_db_xtp_checkpoint_stats, sys.dm_xtp_gc_stats). 5) Extended Events – 3 extended event packages help monitor and troubleshooting. 6) Performance Counters. 7) AMR (Analysis, Migrate, Report) tool
  • #11: Very New: 1) Not supported pre-2014. 2) Not all applications will support In-Memory even if they support SQL 2014. 3) Cannot use replication, mirroring and database snapshots. 4) Only available in premium service Azure SQL instance and ones created after In-Memory launched. Large organisations tend to use a lot of 3rd party applications, therefore little/no control over source database. If QQ alter 3rd party application user databases could violate software support agreements. Troubleshoot future performance problems: 1) No Execution Plans available as it uses compiled assembly instructions so no execution plan created. 2) No Recompile, therefore have to drop and recreate stored procedures and lose permissions. Sharing RAM with SQL Instance: 1) In Memory OLTP bedded within SQL Server. 2) Setting SQL Max memory sets it for both SQL Instance and In-Memory OLTP engine. 3) Both engines compete for same resources – ENTIRE SQL INSTANCE CRASHES? Limited SQL object support: 1) replication, mirroring and database snapshot tables unavailable. 2) No Schema changes – No Alter table. 3) Cannot convert disk-based tables to become In-Memory tables. 4) In-Memory doesn’t recognise – ALTER TABLE, CREATE INDEX, DROP INDEX and ALTER INDEX. 5) FOREIGN KEYS (losing referential integrity) and CHECK CONSTRAINTS unsupported. 6) T-SQL operators and functions not supported. 7) No UNIQUE indexes a part from PRIMARY KEY. 8) Max 8 indexes including PK supported. 9) Cannot create DML triggers. 10) Data type restrictions – Doesn’t support LOB, XML, CLR or max data types. 11) Mirroring and replication of memory- optimized tables unsupported. RAM requirement: 1) Microsoft recommend doubling RAM allocate for version In-Memory OLTP use. 2) In-memory data stored in non-compressed format. SQL 2014 In-memory table limited to 250GB.
  • #12: Lock or latch contention – Reduce excessive lock or latch wait times, In-Memory preserves ACID transaction properties without requiring locks. High I/O and Logging: Doesn’t require disk reads. Streaming checkpoint operations are min resources to write durable data to disk for checkpoint files. In-memory doesn’t write index information to disk. Transaction Logging: Disk-based tables required actions written to T-Log on disk. In-Memory enable SCHEMA_ONLY tables which require no logging. Logging overhead for SCHEMA_AND_DATA is reduced because memory optimized can contain information about many rows and index changes are not logged. Hardware resource limitations: CPU stressed causing slowdown. Natively compiled code uses fewer CPU instructions to interpret code and less CPU use. High volume of INSERTs and SELECTs: In-Memory eliminates locks and latch requirements. Also table logs are more optimized. No index changes are logged. SCHEMA_ONLY help reduce overhead with table row logging. Suitable only for many concurrent SELECTs executed on a single thread as parallel operations unsupported. Session State management: Apps use it to retain session information, e.g. website maintain information about user choices and actions across multiple HTTP requests and doesn’t need to be preserved across server restarts.
  • #13: Launch SQL2014 SSMS Connect to RL-4009480\SQL2014INST Use script; C:\Users\aekeyse\Documents\Technical\Database\SQLUserGroup\ExternalInMemoryOLTP\Demo1DeployingExample-Local
  • #14: Transaction performance collector: Gather information about existing tables and sps and recommends which ones to migrate to In-Memory. Memory Optimization Advisor: Guides through migrating a table to memory-optimized table. Native Compilation Advisor: Identify T-SQL required changes to migrate sps to natively complied sps. Example from - http://sqlmag.com/sql-server-2014/sql-server-2014-analysis-migrate-report-tool-amr
  • #15: Stored procedure usage analysis: Contains store procedure information for migration to natively compiled stored procedures. Table usage analysis: Contains disk-based tables that can be migrated to memory optimized tables.
  • #16: Demo Create AMR_DW Db using Wizard (Object Explorer in SSMS >Management folder >Right-click Data Collection> configure Management Data Warehouse) Configure Data Collection Process (SSMS> Management folder> Data Collection> Tasks>Configure Data Collection) but click cancel. Show the AMR_DW DB in Databases. Blue Peter style –Show existing SQL agent jobs: collection_set_6_collection, collection_set_6_upload, collection_set_7_collection, collection_set_7_upload Blue Peter style – Show Transaction Performance Analysis Overview (Right click MDW database>Reports>Transaction Performance Analysis Overview> Click on URLs) Demo example from http://sqlmag.com/sql-server-2014/sql-server-2014-analysis-migrate-report-tool-amr
  • #18: Show AdventureWorks2008R2.dbo.ErrorLog and it will fail (Right click on ErrorLog and choose Memory Optimization Advisor) Show using AdventureWorks2008R2.dbo.AKEmp, which has no keys or constraints. (Right click table> Memory Optimization Advisor>Set Latin1_General_100_BIN2 for NationalIDNumber and set it as part of primary key> Next>Migrate>Script>Migrate>Click O.K.>Show Db files) Steps used from https://www.pythian.com/blog/sql-server-2014-ctp2-memory-optimization-advisor
  • #20: Right click on InsertName sp>Native Compilation Advisor>Click Cancel. This should work. Use uspGetBillOfMaterials that will fail (Right Click uspGetBillOfMaterials >Native Compilation Advisor>Generate Report>Open the File in Internet Explorer). Demo example from http://sqlserver-help.com/tag/native-compilation-advisor/
  • #21: The process flow I would follow for estimating memory requirements in SQL Server 2014 is this: Get current number of rows in the table. Get current size of row by adding up data types, row header (additional 24 bytes) and 8 bytes for each index. Multiply (1) and (2) and set aside the result. For each hash index, get the bucket count, round up to the next highest power of 2, and then multiply by 8. Get sum of all hash indexes in (4) and set aside. For each non-clustered index, get the width of the key columns, add 8, then multiply that by the number of unique rows. Get sum of all non-clustered indexes in (6) and set aside. Add (3), (5), and (7) together. Multiply the result from (8) by 2, this is the guesstimate that includes row versioning. Example calculation from http://thomaslarock.com/2014/06/estimating-memory-requirements-in-sql-server-2014/
  • #22: There is a memory threshold available depending on the target pool memory Instance target committed memory can be checked by viewing sys.dm_os_sys_info Dynamic Management View Figures from https://www.mssqltips.com/sqlservertip/3368/setup-a-memory-quota-for-sql-server-memory-optimized-databases/
  • #23: Demo using script file; C:\Users\aekeyse\Documents\Technical\Database\SQLUserGroup\ExternalInMemoryOLTP\DemoSetMemoryQuota -Local Can achieve same results using SSMS GUI 1) Open Object Explorer. 2) Expand the Management. 3) Select Resource Governor. 4) Right-click the resource pool to be deleted, and then click Delete. 5) To delete the resource pool, click OK. Demo example from https://www.mssqltips.com/sqlservertip/3368/setup-a-memory-quota-for-sql-server-memory-optimized-databases/
  • #25: Do you think you would use In-Memory OLTP?