Use Cases for In-Memory OLTP Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.

Slides:



Advertisements
Similar presentations
new database engine component fully integrated into SQL Server 2014 optimized for OLTP workloads accessing memory resident data achive improvements.
Advertisements

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.
GETTING STARTED WITH AZURE SQL DB Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1 Preview of Oracle Database 12 c In-Memory Option Thomas Kyte
SQL Server 2008 & Solid State Drives Jon Reade SQL Server Consultant SQL Server 2008 MCITP, MCTS Co-founder SQLServerClub.com, SSC
Applications hitting a wall today with SQL Server Locking/Latching Scale-up Throughput or latency SLA Applications which do not use SQL Server.
IN-MEMORY OLTP By Manohar Punna SQL Server Geeks – Regional Mentor, Hyderabad Blogger, Speaker.
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
Meet Kevin Liu Principal Lead Program Manager Kevin Liu has been with Microsoft and the SQL Server engine team for 7 years, working on key projects like.
Ἑ κατόν by Niko Neugebauer. Niko Neugebauer PASS EvangelistPASS Evangelist SQL Server MVPSQL Server MVP SQLPort ( founder & leaderSQLPort.
Moore’s Law means more transistors and therefore cores, but… CPU clock rate stalled… Meanwhile RAM cost continues to drop.
How to kill SQL Server Performance Håkan Winther.
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.
Scaling out and in with Azure SQL DB Elastic Scale DBA-203 Warner Chaves, MCM/MVP, SQLTurbo.com, Pythian.com.
SQL Server as a Cloud Service November 11th 2015 Warner Chaves SQL MVP/MCM.
SQL Server as a Cloud Service April 15th 2016 Warner Chaves Data Platform MVP/SQL Server MCM.
Best Practices for Columnstore Indexes Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Session Name Pelin ATICI SQL Premier Field Engineer.
Indexing strategies and good physical designs for performance tuning Kenneth Ureña /SpanishPASSVC.
Hitting the SQL Server “Go Faster” Button Rob Douglas #509 | Brisbane 2016.
Introducing Hekaton The next step in SQL Server OLTP performance Mladen Prajdić
SQL Server Internals & Architecture Naomi Williams, SQL DBA LinkedIn
Memory-Optimized Tables Querying at the speed of light.
Cloud Database Platforms for the SQL DBA
In-Memory Capabilities
Real Time Data with Azure and Power BI
Execution Planning for Success
SQL Server In-Memory OLTP: What Every SQL Professional Should Know
Lecture 16: Data Storage Wednesday, November 6, 2006.
Hitting the SQL Server “Go Faster” Button
SQL Server Internals Overview
UFC #1433 In-Memory tables 2014 vs 2016
Taking your application to memory
Parameter Sniffing in SQL Server Stored Procedures
Database Performance Tuning and Query Optimization
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
Azure SQL Data Warehouse for SQL Server DBAS
Introduction to Execution Plans
Working with Very Large Tables Like a Pro in SQL Server 2014
Migrating a Disk-based Table to a Memory-optimized one in SQL Server
Taking your application to memory
Hitting the SQL Server “Go Faster” Button
In-Memory OLTP (IMOLTP) What Can It Do For Me?
Real world In-Memory OLTP
Proving Hardware Bottlenecks &
SQL 2014 In-Memory OLTP What, Why, and How
Azure SQL Data Warehouse for SQL Server DBAS
External Sorting The slides for this text are organized into chapters. This lecture covers Chapter 11. Chapter 1: Introduction to Database Systems Chapter.
Understanding Azure SQL DB Service Tiers
Entity Framework from a database perspective
The 5 Hidden Performance Gems
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
Cloud Data Replication with SQL Data Sync
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
In Memory OLTP Not Just for OLTP.
What’s new with SQL Server
In-Memory OLTP for Database Developers
Hidden Gems of SQL Server 2014
Introduction to Execution Plans
Let Me Finish... Isolating Write Operations
Chapter 11 Database Performance Tuning and Query Optimization
In Memory OLTP Not Just for OLTP.
SQL Server 2016 In-Memory OLTP for the DBA
SQL Server Query Design and Optimization Recommendations
Introduction to Execution Plans
Introduction to Execution Plans
Presentation transcript:

Use Cases for In-Memory OLTP Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com

Our Sponsors

About Me SQL Server DBA for 10 years. Previously an L3 DBA at HP, now a Principal Consultant at Pythian in Ottawa Ontario. SQL Server MCM and MVP. Blog: sqlturbo.com Company site: pythian.com

Agenda  Goal of Today: provide a practical guideline on finding the use case of In-Memory OLTP on our systems, the type of gains we can expect and reason for them. What Why When and Compromises of In-Memory OLTP. Demo and Use Case: The Dials of In-Memory and Durability. Demo and Use Case: The Landing Pad Demo and Use Case: The Table Variable conversion. Proposed workflow to apply when testing your use case.

CPU speed is stagnant but we have more cores per chip. Cost of RAM keeps decreasing and server capacity increasing. There are aggressive optimization algorithms and data structures that work in RAM but not on disk. The Fundamental Premises

TechnologyAvg LatencyInterface Spinning metalMilliseconds (10 -3 ) Solid StateMicroseconds (10 -6 ) RAMNanoseconds (10 -9 ) A matter of speed

Bypass all log IO for non Durable Data. Less log IO produced for Durable Data. Data File IO is optimized for streaming sequential writes in data/delta file pairs. Where are the improvements? Network Protocol Log IO Data File IO Query Optimization No change in Network. Native compilation introduced.

Table Variables are really in memory. No copies of data but multiple versions. New Hash Indexes. All indexes are covering. No fragmentation. CPU use maximized by eliminating bottlenecks and using native compilation. No latching or locking. Where are the improvements? (2) Query Execution Indexing Memory Use CPU

No partitioning. Requires careful measurement (RAM, hash buckets). No parallelism. No FKs, Unique indexes, triggers. Schema is 100% static. Limited T-SQL for native compilation. The compromises of V1

– In-memory OLTP will support Foreign Keys, check, unique constraints, native functions and triggers. – Size limit increased from 256GB to 2TB. – Transparent Database Encryption (TDE) is supported. – ALTER procedure and ALTER table. – Parallel plans are now possible on in-memory tables. – Native compilation support for: outer joins, OR, NOT, UNION (ALL),DISTINCT, Subqueries (IN, NOT IN, EXISTS, NOT EXISTS). The promises of V2 (SQL 2016)

The Dials of In-Memory and Durability  Demo

You have locking issues and row versioning didn’t significantly improve throughput. (Go In-Memory). You don’t have locking but you still have latching and it’s limiting your throughput. (Go In-Memory). Your locking and latching are not significant but you still need to improve throughput. (Go In-Memory and native compilation). Use Case

You have to ingest large amounts of data where there are big spikes of activity and then low periods. (Go In-Memory and mix with Classic). You have high throughput data where its OK if you lose SOME as long as most is there. (Go In-Memory and Delayed Durable). You have data that needs to be queried with the richness of T-SQL but it’s not required to keep between restarts. (Go In-Memory and Schema-Only). Use Case (2)

You have non-durable data that you want to scale-out with AlwaysOn Availability Groups. (Go In-Memory and Delayed Durable). SCHEMA_ONLY will NOT work on this previous use case because there’s no transaction log operation involved. Use Case (3)

In-Memory Tables Durable Delayed Durable Non-Durable + Native Compilation + Maximize CPU throughput on the critical code paths Remove LOCK and LATCH + Remove WRITELOG wait at the risk of data loss + Remove ALL disk IO, no data persisted

The Landing Pad  Demo

An easy way to dip your toes on the In-Memory pool! Even higher gains attained by going with Delayed or No Durability at all. Make sure to maximize CPU power with parallel tasks. Use Case

The Table Variable Conversion  Demo

Another easy way to dip your toes on the In-Memory pool! Anywhere table variables are heavily used and hitting tempdb significantly. Anywhere where temp tables are used but there’s no advantage to them being on tempdb (more indexes, actual stats needed for the plan, etc). The plans you currently have do NOT depend on parallelism. Use Case

1.Understand where in your system is your bottleneck. 2.Does In-Memory OLTP have improvements for it? 3.Are there any show-stoppers in the limitations of V1? 4.Implement, test and compare. 5.Do a capacity planning exercise (RAM, storage, growth). Make sure the benefits are worth it. Workflow for YOUR Use Case

QA?