Download presentation
Presentation is loading. Please wait.
1
UFC #1433 In-Memory tables 2014 vs 2016
Alejandro Cordero Lead Database Consultant – Pythian LinkedIn: BLOG: Sqlturbo.com MCTS, MCSA, CSM
2
Speaker Bio - Alejandro Cordero
SQLTURBO.COM Lead database consultant at Pythian Scrum Master Certified MCSA
3
Agenda Understanding In-Memory Tables Features in SQL2014
Limitations in SQL2014 Demo of SQL2014 In-Memory Tables Features 2016 Limitations in SQL2016 Demo of SQL2016 In-Memory tables Conclusions
4
In Memory Tables Tables that will reside in –Memory
With 30x Performance boost Both Table and Index structures in memory No index and no Data Pages, single rows in memory instead All rows addressed by pointers Latch and Lock Free Consistency trough row versioning and conflict detection write-ahead logging (WAL)
5
Access trough natively compiled stored procedures
Queries available to SQL Server trough dll binaries Query optimization at creation time, fixed execution plan For OLTP style Operations Optimization of performance critical business logic Cons> Limited Built-in Functions, join trough in memory tables only
6
Access trough Ad-hoc Queries
Regular TSQL Mainly for reporting style operations Or when options needed are not available in Natively Compiled Sprocs Cons> less performance improvement than Natively Compiled Sprocs
7
SQL 2014 In-Memory Indexes No fragmentation Don’t Contain Data
No Included Columns All Indexes are Covering ( the full row is returned) – No Lookups NonClustered Range Lookups Order Scans Seeks Hash (bucket count) Point lookups
8
SQL 2014 In-Memory Indexes ..cont
CREATE TABLE t1_1 (c1 INT NOT NULL, INDEX IDX HASH (c1) WITH (BUCKET_COUNT = 100)) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_ONLY) CREATE TABLE t3_3 INDEX IDX NONCLUSTERED (c1))
9
Operations per Index Type
10
SQL 2014 Limitations No triggers
Data Types Limitations > no LOBS, no XML, no CLR, no Spatial data types Constraints > No Foreign Keys, no check contraints No Schema Changes > need to drop and create No add/remove index > need to drop and create Natively Compiled Sprocs > no distinct, no case, just basic built-in math/string/date functions
11
SQL 2014 In-Memory in Action
12
SQL Server 2016 – In-Memory Storage and memory Algorithms improved
Concurrency handling improved Garbage collection Improved Available Operators Improved Modifications of structures
13
Size, Collation, Alter statements, TDE, Parallel Plans
From 256Gb to 2TB Collation from BIN2 to ANY collation ( with performance trade) Structure modification available to drop, add column, alter, rebuild indexes TDE available for data on disk Parallel Plans for certain hash index operations
14
Natively Compiled Stored Procedures
LEFT and RIGHT OUTER JOIN SELECT DISTINCT OR and NOT operators Subqueries in all clauses of a select statement Nested stored procedure calls UNION and UNION ALL ALL built-in math functions
15
Dependency File stream Processing
File stream used to commit changes into physical files Dependency is now removed and In Memory tables will use an NTFS API directly
16
Log Reader Threads In SQL 2014 there was just one log reader thread per database to read transactions affecting memory optimized tables from the transaction log In SQL 2016 multiple log readers are now available scalable by the number of cores
17
Always On and Garbage Collector
Data from Memory Optimized tables had a delay to be available in a Always On replica. Data will now be available almost immediately. When deleting a huge number of row versions due to lots of changes or deleting a big memory optimized table, space wasn’t released immediately, with the new garbage collector space is made available almost immediately.
18
SQL 2016 In-Memory in Action
19
Conclusions In-memory Performance Improvements
Less limitations in SQL2016 Great algorithms based on optimistic concurrency Improved Natively Compiled Stored Procedures
20
Thanks! Correo electrónico: alejandro@sqlturbo.com
LinkedIn: BLOG: Sqlturbo.com MCTS, MCSA, CSM
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.