Microsoft Ignite /1/ :19 PM

Slides:



Advertisements
Similar presentations
6 SQL Server Integration Same manageability, administration & development experience Integrated queries & transactions Integrated HA and backup/restore.
Advertisements

Project “Hekaton” adds in-memory technology to boost performance of OLTP workloads in SQL Server.
Performance and Scalability. Optimizing PerformanceScaling UpScaling Out.
Dandy Weyn Sr. Technical Product Mkt.
Dos and don’ts of Columnstore indexes The basis of xVelocity in-memory technology What’s it all about The compression methods (RLE / Dictionary encoding)
Meanwhile RAM cost continues to drop Moore’s Law on total CPU processing power holds but in parallel processing… CPU clock rate stalled… Because.
SQL Server 2014: In In-memory OLTP for Database Developers.
SQL Server 2014: Overview Phil ssistalk.com.
Applications hitting a wall today with SQL Server Locking/Latching Scale-up Throughput or latency SLA Applications which do not use SQL Server.
SQL Server 2014 adds in-memory technology to boost performance of OLTP workloads.
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.
Moore’s Law means more transistors and therefore cores, but… CPU clock rate stalled… Meanwhile RAM cost continues to drop.
Sofia Event Center November 2013 Margarita Naumova SQL Master Academy.
Introducing Hekaton The next step in SQL Server OLTP performance Mladen Prajdić
Azure.
Enable Operational Analytics (HTAP) in SQL Server 2016 and Azure SQL Database Sunil Agarwal Principal Program Manager, SQL Server Product Tiger Team
Clustered Columnstore index deep dive
IT Operations Management
Data Platform and Analytics Foundational Training
In-Memory Capabilities
Data Platform and Analytics Foundational Training
Microsoft Virtual Academy
System Center Marketing
5/25/2018 5:29 AM BRK3081 Delivering High Performance Analytics with Columnstore Index on Traditional DW and HTAP Workloads Sunil Agarwal (Microsoft) Aaron.
Operational Analytics in SQL Server 2016 and Azure SQL Database
System Center Marketing
Business Critical Application Platform
Microsoft /2/2018 3:42 PM BRK3129 Query Big Data using the Expanded T-SQL footprint with PolyBase in SQL Server 2016 Casey Karst Program Manager.
In-Memory Optimization (OLTP) enhancements overview
SQL 2016 new Hosting Offers Secure Database Hybrid HyperScale
Configure and Manage Your Hybrid Cloud Environment at Scale
AlwaysOn Readable Secondary
6/12/2018 2:19 PM BRK3245 DirectQuery in Analysis Services: best practices, performance, and use cases Marco Russo SQLBI © Microsoft Corporation. All rights.
Enable the Hybrid Data Platform
What’s New in SQL Server 2016 Master Data Services
7/17/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Taking your application to memory
7/22/2018 9:21 PM BRK3270 Building a Better Data Solution: Microsoft SQL Server and Azure Data Services Joey D’Antoni Principal Consultant Denny Cherry.
IT Operations Management
Microsoft Ignite /31/ :08 AM
8/6/ :17 AM THR2214 Hybrid Cloud Activated A customer case study optimizing on-premises & Azure performance and cost Mor Cohen-Tal Senior Product.
Real-Time Operational Analytics overview:
Installation and database instance essentials
9/11/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Mission-critical performance with Microsoft SQL Server 2016
SQL Server 2014 In-Memory OLTP
Introduction to SQL Server Management for the Non-DBA
Business Critical Application Platform
Azure.
SQL Server 2014 In-Memory Overview
Cloud Database Based on SQL Server 2012 Technologies
මොඩියුල විශ්ලේෂණය Buffer Pool Extension භාවිතය.
ColumnStore Index Primer
SQL 2014 In-Memory OLTP What, Why, and How
TechEd /20/ :49 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /23/ :44 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
TechEd /28/ :51 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
11/29/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
TechEd /2/2018 7:32 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Accelerate Your Data Insights with SQL Server 2014
Microsoft SQL Server 2014 for Oracle DBAs Module 7
Statistics for beginners – In-Memory OLTP
TechEd /15/2019 8:08 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
In-Memory OLTP for Database Developers
Sunil Agarwal | Principal Program Manager
TechEd /28/2019 7:27 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
04 | Performance and the Premium SKU
SQL Server 2014: In-Memory OLTP Overview
Microsoft Virtual Academy
Sunil Agarwal | Principal Program Manager
Presentation transcript:

Microsoft Ignite 2015 1/1/2019 12:19 PM © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

SQL Server In-Memory Overview BRK2563 SQL Server In-Memory Overview Kevin Farlee

Recent SQL Server Investments 1/1/2019 Recent SQL Server Investments In-Memory Technologies Enhanced High Availability New Hybrid Scenarios Other investments In-Memory OLTP 5-25x performance gain for OLTP integrated into SQL Server Greater scaling In-Memory DW 5-25x performance gain and high data compression Updatable and clustered Readable Secondary for Column Store Always On Enhancements Increased availability and improved manageability of active secondaries Performance improvements Online Database Operations Increased availability for index/partition maintenance Backup to Azure Easy to implement and cost effective Disaster Recovery solution to Azure Storage HA to Azure VM Easy to implement and cost effective high availability solution with Windows Azure VM Deploy to Azure Deployment wizard to migrate database Better together with Windows Server WS2012 ReFS support Online resizing VHDx Hyper-V replica WS 2012 R2 support Windows Server 2016 support Extending Power View Enable Power View on existing analytic models and support new multi- dimensional models. © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

SQL Server In-Memory Technology 1/1/2019 SQL Server In-Memory Technology In-Memory Technologies Applicable to Transactional workloads: Concurrent data entry, processing and retrieval In-Memory OLTP 5-20X performance gain for OLTP integrated into SQL Server In-Memory DW 5-25X performance gain and high data compression Updatable and clustered Applicable to Decision support workloads: Large scans and aggregates © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Outline In-Memory OLTP Overview In-Memory Data Warehousing Overview Motivating trends – hardware, software, apps In-memory OLTP architecture & integration into SQL Server Performance and customer results New in SQL Server 2016 In-Memory Data Warehousing Overview Scenarios Benefits How it works

Why In-memory OLTP (aka Hekaton) Customer demand for ever higher throughput and performance OLTP at a lower cost Hardware trends demand architectural changes on RDBMS to meet those demands In-memory OLTP is: High performance, Memory-optimized OLTP engine, Integrated into SQL Server and Architected for modern hardware

Hardware Trends New CPU won’t run a short transaction much faster Moore’s Law on total CPU processing power holds but in parallel processing… New CPU won’t run a short transaction much faster CPU clock rate stalled… Because processors would melt… Meanwhile RAM cost continues to drop

Outline In-Memory OLTP Overview In-Memory Data Warehousing Overview Motivating trends – hardware, software, apps In-memory OLTP architecture & integration into SQL Server Performance and customer results In-Memory Data Warehousing Overview Scenarios Benefits How it works Coming in SQL Server 2016

In-Memory OLTP Architectural Pillars Principles Performance-critical data fits in memory Push decisions to compilation time Conflicts are Rare Built-In Architectural Pillars Main-Memory Optimized T-SQL Compiled to Native Machine Code Non-Blocking Execution SQL Server Integration Direct pointers to rows Indexes exist only in memory No buffer pool No write-ahead logging Stream-based storage T-SQL compiled to machine code leveraging VC compiler Procedure and its queries, becomes a C function Aggressive compile- time optimizations Multi-version optimistic concurrency control, full ACID support Lock-free data structures No locks, latches or spinlocks, No I/O in transaction Same manageability, administration & development experience Integrated queries & transactions Integrated HA and backup/restore Results In-memory cache speed with capabilities of a database Queries & business logic run at native-code speed Transactions execute to completion without blocking Hybrid engine and integrated experience

In-Memory OLTP: Integration and Application Migration Few improvements in comm layers TDS Handler and Session Management Key SQL Server.exe Parser, Catalog, Optimizer Existing SQL Component Execution Plan cache for ad-hoc T-SQL and SPs Hekaton Compiler Native-Compiled SPs and Schema 20-40x more efficient Real Apps see 2-30x T-SQL Interpreter Hekaton Component Access Methods Hekaton Engine: Memory_optimized Tables & Indexes Non-durable Table option Query Interop Generated .dll Buffer Pool T1 T2 T3 Tables Reduced log contention; Low latency still critical for performance T1 T2 T3 Indexes Memory-optimized Table Filegroup Transaction Log Data Filegroup T1 T2 T3 T1 T2 T3 T1 T2 T3 T1 T2 T3

DURABILITY=SCHEMA_ONLY Create Table DDL CREATE TABLE [Customer]( [CustomerID] INT NOT NULL PRIMARY KEY NONCLUSTERED HASH WITH (BUCKET_COUNT = 1000000), [Name] NVARCHAR(250) NOT NULL, [CustomerSince] DATETIME NULL INDEX [ICustomerSince] NONCLUSTERED INDEX [ICustomerID-Since] NONCLUSTERED (CustomerID, CustomerSince) ) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA); Hash Index BUCKET_COUNT Use 2x # of unique index key values Indexes may be specified inline NONCLUSTERED indexes are supported Multi-Column indexes are supported This table is memory optimized This table is durable. Non-durable tables: DURABILITY=SCHEMA_ONLY

Memory Optimized Tables 1/1/2019 12:19 PM Memory Optimized Tables Optimized for high-throughput OLTP Optimized for in-memory © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Create Procedure DDL CREATE PROCEDURE [dbo].[InsertOrder] @id INT, @date DATETIME WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER AS BEGIN ATOMIC (TRANSACTION ISOLATION LEVEL = SNAPSHOT, LANGUAGE = 'us_english') -- insert T-SQL here END This proc is natively compiled Native procs must be schema-bound Execution context is required Atomic blocks Create a transaction if there is none Otherwise, create a savepoint Session settings are fixed at create time

Outline In-Memory OLTP Overview In-Memory Data Warehousing Overview Motivating trends – hardware, software, apps In-memory OLTP architecture & integration into SQL Server Performance and customer results New in SQL Server 2016 In-Memory Data Warehousing Overview Scenarios Benefits How it works

Early Customer Performance Gains Apps that take full advantage: e.g. web app session state Apps with periodic bulk updates & heavy random reads Existing apps typically see 4-7x improvement Despite 20 years of optimizing for OLTP benchmarks – we still get 2x on a workload derived from TPC-C

Suitable Application Characteristics Application is suited for in-memory processing All performance critical data already fits in memory Transaction locking or physical latching causing stalls and blocking Application is “OLTP-Like” Relatively short-lived transactions High degree of concurrent transactions from many connections Examples: Stock trading, travel reservations, order processing Application migration simplified if Stored procedures used Performance problems isolated to subset of tables and SPs

Production Customers Customer App Pattern SQL Common Labs Event Reporting Shock Absorber BWIN - Session State Relational Cache Saxobank Read Scale Baltika Breweries OLTP Edgenet Derivco SBI Liquidity Plenty Of Fish CareGroup

New in SQL Server 2016 Enhanced scaling Greatly improved surface area Security Enhancements More scenarios supported More platforms supported

Outline In-Memory OLTP Overview In-Memory Data Warehousing Overview Motivating trends – hardware, software, apps In-memory OLTP architecture & integration into SQL Server Performance and customer results New in SQL Server 2016 In-Memory Data Warehousing Overview Scenarios Benefits How it works

In-memory DW (ColumnStore) Typical scenarios Data is typically written once and read many times Queries are against large amounts of data Aggregating, filtering are common Star & snowflake schemas are common using dimension and fact tables New data is typically appended to fact tables

In-memory DW overview

Columnstore internals Data stored as rows Data stored as columns C1 C2 C3 C5 C4 Benefits: Improved compression: Data from same domain compress better Reduced I/O: Fetch only columns needed Improved Performance: More data fits in memory …

ColumnStore Index Example OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount 20101107 106 01 1 6 30.00 103 04 2 17.00 109 20.00 03 05 3 4 20101108 02 5 25.00 102 14.00 10.00 20101109

1. Horizontally Partition (create Row Groups) OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount 20101107 106 01 1 6 30.00 103 04 2 17.00 109 20.00 03 05 3 4 20101108 02 5 25.00 ~1M rows OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount 20101108 102 02 1 14.00 106 03 2 5 25.00 109 01 10.00 20101109 04 4 20.00 103 17.00

2. Vertically Partition (create Segments) OrderDateKey 20101107 20101108 ProductKey 106 103 109 StoreKey 01 04 03 05 02 RegionKey 1 2 3 Quantity 6 1 2 4 5 SalesAmount 30.00 17.00 20.00 25.00 OrderDateKey 20101108 20101109 ProductKey 102 106 109 103 StoreKey 02 03 01 04 RegionKey 1 2 Quantity 1 5 4 SalesAmount 14.00 25.00 10.00 20.00 17.00

3. Compress Each Segment Some segments will compress more than others OrderDateKey 20101107 20101108 ProductKey 106 103 109 StoreKey 01 04 03 05 02 RegionKey 1 2 3 Quantity 6 1 2 4 5 SalesAmount 30.00 17.00 20.00 25.00 OrderDateKey 20101108 20101109 RegionKey 1 2 ProductKey 102 106 109 103 Quantity 1 5 4 StoreKey 02 03 01 04 SalesAmount 14.00 25.00 10.00 20.00 17.00 Some segments will compress more than others *Encoding and reordering not shown

4. Read The Data Segment Elimination Column Elimination SELECT ProductKey, SUM (SalesAmount) FROM SalesTable WHERE OrderDateKey < 20101108 Column Elimination OrderDateKey 20101107 20101108 ProductKey 106 103 109 StoreKey 01 04 03 05 02 RegionKey 1 2 3 Quantity 6 1 2 4 5 SalesAmount 30.00 17.00 20.00 25.00 OrderDateKey 20101108 20101109 RegionKey 1 2 Segment Elimination ProductKey 102 106 109 103 Quantity 1 5 4 StoreKey 02 03 01 04 SalesAmount 14.00 25.00 10.00 20.00 17.00

Updatable Columnstore Index Table consists of column store and row store DML (update, delete, insert) operations leverage delta store INSERT Values Always lands into delta store DELETE Logical operation Data physically remove after REBUILD operation is performed. UPDATE DELETE followed by INSERT. BULK INSERT if batch < 100k, inserts go into delta store, otherwise columnstore SELECT Unifies data from Column and Row stores - internal UNION operation. “Tuple mover” converts data into columnar format once segment is full (1M of rows) REORGANIZE statement forces tuple mover to start. C1 C2 C3 C4 C5 C6 Delta (row) store C1 C2 C3 C4 C5 C6 Column Store tuple mover

ColumnStore: SQL Server 2016 Performance and HA Online Index Maintenance Batch Operations for SORT Window Aggregates Single Threaded Execution String predicate push down SYMD support Aggregate Pushdown Parallel Insert Loading data is very primitive Query offload to AlwaysOn/RS Functionality: Fast equality search and short-range scans PK/FK enforcement Coarser Concurrency Locking Granularity – Impact MERGE load or UPDATES No support of SI/RCSI Full Support of MARS (no updates) Improved Supportability

Towards Seamless Integration in SQL 2014 SQL Server RDBMS Column-Store Engine for DW Disk-optimized, row-store engine Memory-optimized OLTP engine Available only in one engine Batch Query Operators Blobs Native-Compiled Procedures Work across two engines with limitations Range + Column secondary indexes Readable Secondaries Work across all engines but with limitations Transactions, Queries, Stored Procedures AlwaysOn, Backup/Restore, Security, Admin, Deployment Nearly seamless across all engines Not comprehensive - only representative examples.

Other Relevant Sessions: BRK2563: In-Memory Technologies Overview for Microsoft SQL Server and Microsoft Azure; Tuesday 10:45-12:00 BRK4552: Operational Analytics in SQL Server; Tuesday 3:15-4:30 BRK3576: In-Memory OLTP – The Road Ahead; Tuesday 5:00-6:15 BRK2574: ColumnStore Index: Microsoft SQL Server 2014 and Beyond; Wednesday 1:30-2:45PM Lab: In-Memory OLTP Monitoring & Troubleshooting; Thursday 9-10:15 BRK3554 Microsoft SQL Server 2014 In-Memory OLTP and Columnstore Customer Deployments; Thursday 1:30-2:45 BRK2563: Microsoft SQL Server Unplugged; Thursday 3:15-4:30 *Other In-Memory OLTP Labs are available as well throughout the conference

Please evaluate this session 1/1/2019 12:19 PM Please evaluate this session Your feedback is important to us! Visit Myignite at http://myignite.microsoft.com or download and use the Ignite Mobile App with the QR code above. © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

1/1/2019 12:19 PM © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.