SlideShare une entreprise Scribd logo
1  sur  52
SQL Server 2014 In-Memory Tables
(Extreme Transaction Processing)
Advanced
Tony Rogerson, SQL Server MVP
@tonyrogerson
tonyrogerson@torver.net
http://www.sql-server.co.uk
Who am I?
• Freelance SQL Server professional and Data Specialist
• Fellow BCS, MSc in BI, PGCert in Data Science
• Started out in 1986 – VSAM, System W, Application System, DB2,
Oracle, SQL Server since 4.21a
• Awarded SQL Server MVP yearly since 97
• Founded UK SQL Server User Group back in ’99, founder member
of DDD, SQL Bits, SQL Relay, SQL Santa and Project Mildred
• Interested in commodity based distributed processing of Data.
• I have an allotment where I grow vegetables - I do not do any
analysis on how they grow, where they grow etc. My allotment is
where I escape technology.
Agenda
• Define concept “In-Memory”
• Test Harness
• Storage
• Row Chains
• Indexing
– Hash
– Bw Tree and B+ Tree
– Multi-Version Concurrency Control (MVCC)
• Monitoring
DEFINE
“In-Memory”
What is IMDB / DBIM?
• Entire database resides in Main memory
• Hybrid - selective tables reside entirely in memory
• Row / Column store
– Oracle keeps two copies of the data – in row AND column store –
optimiser chooses
– SQL Server 2014 you choose –
• Columnstore (Column Store Indexing) – traditionally for OLAP
• Rowstore (memory optimised table with hash or range index) – traditionally
for OLTP
• Non-Volatile Memory changes everything – it’s here now!
– SQL Server 2014 Buffer Pool Extensions
SQL Server “in-memory”
• Column Store (designed for OLAP)
– Column compression to reduce memory required
– SQL 2012:
• One index per table, nonclustered only, table read-only
– SQL 2014:
• Only index on table – clustered, table is now updateable
• Memory Optimised Tables (designed for OLTP)
– Standard CREATE TABLE with restrictions on FK’s and other
constraints
Traditional Tables: Buffer Pool usage (Read)
Data on Stable
Storage
(Disk/SSD)
Buffer Pool
(Server Memory
60GB)
Table (500GB)
• 500GB does not fit into 60GB!
• Buffer pool (the cache) allows us to read tables larger
than available memory
Traditional Tables: Buffer Pool usage (Write)
Data on Stable
Storage
(Disk/SSD)
Buffer Pool
(Server Memory
60GB)
Table (500GB)
• 500GB does not fit into 60GB!
• Buffer pool (the cache) + Transaction Log allow us
to write tables larger than available memory
• Penalty for that ability!
TEST HARNESS
Test Harness
In-mem P01
In-mem P02
On-store P01
Data in last
5 minutes
Older than
5 minutes
Logical Table
(VIEW)
insert /
update /
delete
Routing table controls
which in-memory table
the insert should go to.
(INSTEAD OF trigger)
0
1
Test harness operations
• 10 connections each inserting 500 rows in a single
transaction, running every 15 seconds with a random
delay of 0 – 10 seconds.
• Manual Runs:
– Move rows older than 5 minutes from in-memory into on-
storage tables
– Update rows
DEMO
• CREATEDB.sql
• PARTITIONING.sql
• EXEC.sql
• AGENT JOBS.sql (enable the jobs)
STORAGE
DEMO
• TRANSACTION LOG.sql
Transaction Logging
• All data is “in-memory” – WAL not required
• On COMMIT TRAN
– Checks made depending on Isolation
– Data made Durable (to Checkpoint File Pair (CFP))
• Versions of rows kept in memory (see MVCC)
• COMMIT is dramatically quicker because
– Less data logged
• no UNDO
• no INDEX records
• multiple log records combined grouped together to reduce log header overhead
– Bulked IO
Storage
Traditional “on-storage”
tables
Memory Optimised
tables
(CFP – Checkpoint File Pairs)
Storage of meta-data and
compiled version of Native
Compiled Procs and Tables.
• System tables used for “some”
MOT meta-data
• MOT have their own set of DMV’s
How MOT use FILESTREAM
• Multiple Files
– Data >= 16MiB or 128MiB files, stores row data
– Delta >= 1MiB or 8MiB stores tombstone information
– Data/Delta may be larger if long running transactions
• All reads and writes are sequential
• Offline Checkpoint Worker
– Reads log
– Appends to Data / Delta files
– Random IO is not required!
Life of a Row Version
Memory
CFP
(Data / Delta)
CFP
(Data / Delta )
No active rows
3. MERGE
4. GARBAGE
COLLECT
2. CHECKPOINT
1. Write to storage LDF – offline
checkpoint worker writes to
CFP
2. Close CFP and mark ACTIVE
(Durable Checkpoint
established)
3. ACTIVE CFP’s with >= 50%
free space can be merged.
4. Files with no active rows can
be deleted
CHECKPOINT
• After 512MiB data written to log or Manual CHECKPOINT
• CFP state: UNDER CONSTRUCTION (on recovery, data
taken from transaction log)
• On CHECKPOINT
– UNDER CONSTRUCTION CTP closed, becomes ACTIVE
– Now have a durable checkpoint
DEMO
• CFP.sql
sys.dm_db_xtp_checkpoint_files
Life of a Row Version
Memory
CFP
(Data / Delta)
CFP
(Data / Delta )
No active rows
3. MERGE
4. GARBAGE
COLLECT
2. CHECKPOINT
1. Write to storage LDF – offline
checkpoint worker writes to
CFP
2. Close CFP and mark ACTIVE
(Durable Checkpoint
established)
3. ACTIVE CFP’s with >= 50%
free space can be merged.
4. Files with no active rows can
be deleted
Row Updates
• Actually DELETE and INSERT
• Delete marker (not the row) is stored in DELTA file
• INSERT is stored in DATA file
• Versions hang around until no other sessions require
them
Garbage Collection
• Before GC can be performed:
– Rows get Durabilised  to storage on COMMIT
– Checkpoint File Pairs grow, new ones created
– Various CFP will contain the “current” rows we want in case of a
failure [remember – log gets backed up and truncated]
– Merge CFP into a new one – pull out current rows into a new CFP
• CFP end up containing just old row versions no longer
required
• GC removes old CFP’s (FILESTREAM GC)
SQL Server Memory Pools
Stable
Storage
(MDF/NDF
Files)
Buffer Pool
Table
Data Data in/out as required
Memory Internal Structures (proc/log
cache etc.)
SQL Server
Memory
Space
Memory Optimised Tables
FINITE
ELASTIC
MEMORY OPTIMISED TABLES
Indexing and how it works
Hash Indexing
bucket_position = f hash( data )
Hash is deterministic (same value in gives same value out)
The hash is the position in the memory map
table
Bucket
position
Hash Collisions
• Example:1 million unique values hashed into 5000 hash
values?
– Multiple unique values mush hash to the same hash value
• Multiple key (real data) values hang off same hash bucket
• Termed: Row Chain
– Chain of connected rows
• SQL Server 2014 Hash function is Balanced and follows a
Poisson distribution – 1/3 empty, 1/3 at least one index
key and 1/3 containing two index keys
Link from Memory Map Table to first row in
Row Chain
Memory Optimised Table Row Header
Up-to 8 Index Memory
Pointers
• Above is a 3 row – row chain, all three rows hash to bucket #3
• Most recent row is first row in chain
• Rows in stable storage
• accessed using files, pages and extents
• Rows in memory optimised
• accessed using memory pointers
Memory
Location
Hash Index
DEMO
• VISUALISE ROW CHAIN.sql
Row Header – Multiple Index Pointers
Data Rows (Index #‘x’ Pointer is next memory pointer in ‘row’ chain)
Memory Pointers
per Hash Bucket
Row chain is
defined
through the
Row Header
Hash Index Scan
• Scan follows Hash Index (8 byte per
bucket)
• Jump to each fist row in row chain
• Read row chain (lots of bytes per
row – header + data)
BUCKET_COUNT options
1024 – 8 kilobytes
2048 – 16 kilobytes
4096 – 32 kilobytes
8192 – 64 kilobytes
16384 – 128 kilobytes
32768 – 256 kilobytes
65536 – 512 kilobytes
131072 – 1 megabytes
262144 – 2 megabytes
524288 – 4 megabytes
1048576 – 8 megabytes
2097152 – 16 megabytes
4194304 – 32 megabytes
8388608 – 64 megabytes
16777216 – 128 megabytes
33554432 – 256 megabytes
67108864 – 512 megabytes
134217728 – 1,024 megabytes
268435456 – 2,048 megabytes
536870912 – 4,096 megabytes
1073741824 – 8,192 megabytes
What makes a Row Chain grow?
• Hash collisions
• Row versions from updates
– An update is a {delete, insert}
• Late garbage collection because of long running
transactions
• Garbage collection can’t keep up because of box load and
amount to do {active threads do garbage collection on
completion of work}
Range Index (Bw Tree ≈ B+Tree)
8KiB
1 row tracks a page
in level below
Root
Leaf
Leaf row per table row
{index-col}{pointer}
B+ Tree
Range Index (Bw Tree ≈ B+Tree)
8KiB
1 row tracks a page
in level below
Root
Leaf
Leaf row per table row
{index-col}{pointer}
B+ Tree
Range Index (Bw Tree ≈ B+Tree)
Bw Tree
8KiB
Root
Leaf
Leaf row per unique value
{index-col}{memory-pointer}
Row Chain
Range Index (Bw Tree ≈ B+Tree)
8KiB
1 row tracks a page
in level below
Root
Leaf
Leaf row per table row
{index-col}{pointer}
Bw TreeB+Tree
8KiB
Root
Leaf
Leaf row per unique value
{index-col}{memory-pointer}
Row Chain
≈
Multi-Version Concurrency Control (MVCC)
• Compare And Swap replaces Latching
• Update is actually INSERT and Tombstone
• Row Versions [kept in memory]
• Garbage collection task cleans up versions no longer required
(stale data rows)
• Version not required determined by active transactions and
snapshot the connection has of the data
• Your in-memory table can double, triple, x 100 etc. in size
depending on access patterns (data mods + query durations)
Versions in the Row Chain
Newest
Oldest
TS_START TS_END Connection
2 NULL 55
7 NULL 60
50 NULL 80
Versions in the Row Chain
Newest
Oldest
TS_START TS_END Connection
2 10 55
7 NULL 60
50 NULL 80
Tombstone
Versions in the Row Chain
Current
TS_START TS_END Connection
2 NULL 55
7 NULL 60
50 NULL 80
Tombstone
The problem with Versions
• Available memory is finite
• All data must fit in memory
• You may well run out of memory!!
• Removal of versions from memory is not immediate
Monitoring
• sys.hash_indexes
• sys.dm_db_xtp_hash_index_stats
• sys.dm_db_xtp_table_memory_stats
• sys.dm_db_xtp_index_stats
• sys.dm_db_xtp_object_stats
Summary
• Memory is finite
• Access patterns
– Watch your long running transactions
– COMMIT is now your friend (batch up)
– Version creation is your enemy
• Consider Index strategy very careful and monitor
SQL Server 2014 Memory Optimised Tables - Advanced
SQL Server 2014 Memory Optimised Tables - Advanced
SQL Server 2014 Memory Optimised Tables - Advanced

Contenu connexe

Tendances

Column-Stores vs. Row-Stores: How Different are they Really?
Column-Stores vs. Row-Stores: How Different are they Really?Column-Stores vs. Row-Stores: How Different are they Really?
Column-Stores vs. Row-Stores: How Different are they Really?Daniel Abadi
 
VLDB Administration Strategies
VLDB Administration StrategiesVLDB Administration Strategies
VLDB Administration StrategiesMurilo Miranda
 
cPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomycPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomyRyan Robson
 
HBaseCon 2013: Full-Text Indexing for Apache HBase
HBaseCon 2013: Full-Text Indexing for Apache HBaseHBaseCon 2013: Full-Text Indexing for Apache HBase
HBaseCon 2013: Full-Text Indexing for Apache HBaseCloudera, Inc.
 
An introduction to SQL Server in-memory OLTP Engine
An introduction to SQL Server in-memory OLTP EngineAn introduction to SQL Server in-memory OLTP Engine
An introduction to SQL Server in-memory OLTP EngineKrishnakumar S
 
Hive Data Modeling and Query Optimization
Hive Data Modeling and Query OptimizationHive Data Modeling and Query Optimization
Hive Data Modeling and Query OptimizationEyad Garelnabi
 
Tajo Seoul Meetup July 2015 - What's New Tajo 0.11
Tajo Seoul Meetup July 2015 - What's New Tajo 0.11Tajo Seoul Meetup July 2015 - What's New Tajo 0.11
Tajo Seoul Meetup July 2015 - What's New Tajo 0.11Hyunsik Choi
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQLJim Mlodgenski
 
HBase Advanced - Lars George
HBase Advanced - Lars GeorgeHBase Advanced - Lars George
HBase Advanced - Lars GeorgeJAX London
 
Storage Engine Wars at Parse
Storage Engine Wars at ParseStorage Engine Wars at Parse
Storage Engine Wars at ParseMongoDB
 
SQL Server In-Memory OLTP introduction (Hekaton)
SQL Server In-Memory OLTP introduction (Hekaton)SQL Server In-Memory OLTP introduction (Hekaton)
SQL Server In-Memory OLTP introduction (Hekaton)Shy Engelberg
 
8. key value databases laboratory
8. key value databases laboratory 8. key value databases laboratory
8. key value databases laboratory Fabio Fumarola
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive QueriesOwen O'Malley
 
The Hive Think Tank: Rocking the Database World with RocksDB
The Hive Think Tank:  Rocking the Database World with RocksDBThe Hive Think Tank:  Rocking the Database World with RocksDB
The Hive Think Tank: Rocking the Database World with RocksDBThe Hive
 
Optimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDsOptimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDsJavier González
 

Tendances (20)

Column-Stores vs. Row-Stores: How Different are they Really?
Column-Stores vs. Row-Stores: How Different are they Really?Column-Stores vs. Row-Stores: How Different are they Really?
Column-Stores vs. Row-Stores: How Different are they Really?
 
VLDB Administration Strategies
VLDB Administration StrategiesVLDB Administration Strategies
VLDB Administration Strategies
 
cPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB AnatomycPanelCon 2014: InnoDB Anatomy
cPanelCon 2014: InnoDB Anatomy
 
HBaseCon 2013: Full-Text Indexing for Apache HBase
HBaseCon 2013: Full-Text Indexing for Apache HBaseHBaseCon 2013: Full-Text Indexing for Apache HBase
HBaseCon 2013: Full-Text Indexing for Apache HBase
 
An introduction to SQL Server in-memory OLTP Engine
An introduction to SQL Server in-memory OLTP EngineAn introduction to SQL Server in-memory OLTP Engine
An introduction to SQL Server in-memory OLTP Engine
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
Hive Data Modeling and Query Optimization
Hive Data Modeling and Query OptimizationHive Data Modeling and Query Optimization
Hive Data Modeling and Query Optimization
 
Tajo Seoul Meetup July 2015 - What's New Tajo 0.11
Tajo Seoul Meetup July 2015 - What's New Tajo 0.11Tajo Seoul Meetup July 2015 - What's New Tajo 0.11
Tajo Seoul Meetup July 2015 - What's New Tajo 0.11
 
Introduction to PostgreSQL
Introduction to PostgreSQLIntroduction to PostgreSQL
Introduction to PostgreSQL
 
HBase Advanced - Lars George
HBase Advanced - Lars GeorgeHBase Advanced - Lars George
HBase Advanced - Lars George
 
Storage Engine Wars at Parse
Storage Engine Wars at ParseStorage Engine Wars at Parse
Storage Engine Wars at Parse
 
Write behind logging
Write behind loggingWrite behind logging
Write behind logging
 
NoSQL: Cassadra vs. HBase
NoSQL: Cassadra vs. HBaseNoSQL: Cassadra vs. HBase
NoSQL: Cassadra vs. HBase
 
SQL Server In-Memory OLTP introduction (Hekaton)
SQL Server In-Memory OLTP introduction (Hekaton)SQL Server In-Memory OLTP introduction (Hekaton)
SQL Server In-Memory OLTP introduction (Hekaton)
 
8. key value databases laboratory
8. key value databases laboratory 8. key value databases laboratory
8. key value databases laboratory
 
Optimizing Hive Queries
Optimizing Hive QueriesOptimizing Hive Queries
Optimizing Hive Queries
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
The Hive Think Tank: Rocking the Database World with RocksDB
The Hive Think Tank:  Rocking the Database World with RocksDBThe Hive Think Tank:  Rocking the Database World with RocksDB
The Hive Think Tank: Rocking the Database World with RocksDB
 
MySQL vs MonetDB Bencharmarks
MySQL vs MonetDB BencharmarksMySQL vs MonetDB Bencharmarks
MySQL vs MonetDB Bencharmarks
 
Optimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDsOptimizing RocksDB for Open-Channel SSDs
Optimizing RocksDB for Open-Channel SSDs
 

En vedette

How to fix IO problems for faster SQL Server performance
How to fix IO problems for faster SQL Server performanceHow to fix IO problems for faster SQL Server performance
How to fix IO problems for faster SQL Server performanceSolarWinds
 
Random thoughts on sql server performance
Random thoughts on sql server performanceRandom thoughts on sql server performance
Random thoughts on sql server performanceNigel Foulkes-Nock
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryAntonios Chatzipavlis
 
Geek Sync I SQL Server 2016 Performance Tricks You Need to Know
Geek Sync I SQL Server 2016 Performance Tricks You Need to KnowGeek Sync I SQL Server 2016 Performance Tricks You Need to Know
Geek Sync I SQL Server 2016 Performance Tricks You Need to KnowIDERA Software
 
Evolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/SpecialistEvolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/SpecialistTony Rogerson
 
SQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type ExplainedSQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type ExplainedConfio Software
 
Easy way to do rolling upgrades for SQL Server
Easy way to do rolling upgrades for SQL ServerEasy way to do rolling upgrades for SQL Server
Easy way to do rolling upgrades for SQL ServerSolarWinds
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDBDenny Lee
 
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
 
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft EngineerPLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft EngineerMarek Maśko
 
SQL Server Reporting Services Disaster Recovery webinar
SQL Server Reporting Services Disaster Recovery webinarSQL Server Reporting Services Disaster Recovery webinar
SQL Server Reporting Services Disaster Recovery webinarDenny Lee
 
SQLCAT - Data and Admin Security
SQLCAT - Data and Admin SecuritySQLCAT - Data and Admin Security
SQLCAT - Data and Admin SecurityDenny Lee
 
Building a Fast, Reliable SQL Server for kCura Relativity
Building a Fast, Reliable SQL Server for kCura RelativityBuilding a Fast, Reliable SQL Server for kCura Relativity
Building a Fast, Reliable SQL Server for kCura RelativityBrent Ozar
 
SQL Server Integration Services Best Practices
SQL Server Integration Services Best PracticesSQL Server Integration Services Best Practices
SQL Server Integration Services Best PracticesDenny Lee
 
500-Level Guide to Career Internals
500-Level Guide to Career Internals500-Level Guide to Career Internals
500-Level Guide to Career InternalsBrent Ozar
 
SQLCAT: Tier-1 BI in the World of Big Data
SQLCAT: Tier-1 BI in the World of Big DataSQLCAT: Tier-1 BI in the World of Big Data
SQLCAT: Tier-1 BI in the World of Big DataDenny Lee
 
500-Level Guide to Career Internals
500-Level Guide to Career Internals500-Level Guide to Career Internals
500-Level Guide to Career InternalsBrent Ozar
 
Introduction to Microsoft's Big Data Platform and Hadoop Primer
Introduction to Microsoft's Big Data Platform and Hadoop PrimerIntroduction to Microsoft's Big Data Platform and Hadoop Primer
Introduction to Microsoft's Big Data Platform and Hadoop PrimerDenny Lee
 
SQL Server Reporting Services Disaster Recovery Webinar
SQL Server Reporting Services Disaster Recovery WebinarSQL Server Reporting Services Disaster Recovery Webinar
SQL Server Reporting Services Disaster Recovery WebinarDenny Lee
 
Ensuring compliance of patient data with big data and bi [bdii 301-m] - (4078)
Ensuring compliance of patient data with big data and bi [bdii 301-m] - (4078)Ensuring compliance of patient data with big data and bi [bdii 301-m] - (4078)
Ensuring compliance of patient data with big data and bi [bdii 301-m] - (4078)Denny Lee
 

En vedette (20)

How to fix IO problems for faster SQL Server performance
How to fix IO problems for faster SQL Server performanceHow to fix IO problems for faster SQL Server performance
How to fix IO problems for faster SQL Server performance
 
Random thoughts on sql server performance
Random thoughts on sql server performanceRandom thoughts on sql server performance
Random thoughts on sql server performance
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to query
 
Geek Sync I SQL Server 2016 Performance Tricks You Need to Know
Geek Sync I SQL Server 2016 Performance Tricks You Need to KnowGeek Sync I SQL Server 2016 Performance Tricks You Need to Know
Geek Sync I SQL Server 2016 Performance Tricks You Need to Know
 
Evolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/SpecialistEvolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/Specialist
 
SQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type ExplainedSQL Server ASYNC_NETWORK_IO Wait Type Explained
SQL Server ASYNC_NETWORK_IO Wait Type Explained
 
Easy way to do rolling upgrades for SQL Server
Easy way to do rolling upgrades for SQL ServerEasy way to do rolling upgrades for SQL Server
Easy way to do rolling upgrades for SQL Server
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
 
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...
 
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft EngineerPLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
 
SQL Server Reporting Services Disaster Recovery webinar
SQL Server Reporting Services Disaster Recovery webinarSQL Server Reporting Services Disaster Recovery webinar
SQL Server Reporting Services Disaster Recovery webinar
 
SQLCAT - Data and Admin Security
SQLCAT - Data and Admin SecuritySQLCAT - Data and Admin Security
SQLCAT - Data and Admin Security
 
Building a Fast, Reliable SQL Server for kCura Relativity
Building a Fast, Reliable SQL Server for kCura RelativityBuilding a Fast, Reliable SQL Server for kCura Relativity
Building a Fast, Reliable SQL Server for kCura Relativity
 
SQL Server Integration Services Best Practices
SQL Server Integration Services Best PracticesSQL Server Integration Services Best Practices
SQL Server Integration Services Best Practices
 
500-Level Guide to Career Internals
500-Level Guide to Career Internals500-Level Guide to Career Internals
500-Level Guide to Career Internals
 
SQLCAT: Tier-1 BI in the World of Big Data
SQLCAT: Tier-1 BI in the World of Big DataSQLCAT: Tier-1 BI in the World of Big Data
SQLCAT: Tier-1 BI in the World of Big Data
 
500-Level Guide to Career Internals
500-Level Guide to Career Internals500-Level Guide to Career Internals
500-Level Guide to Career Internals
 
Introduction to Microsoft's Big Data Platform and Hadoop Primer
Introduction to Microsoft's Big Data Platform and Hadoop PrimerIntroduction to Microsoft's Big Data Platform and Hadoop Primer
Introduction to Microsoft's Big Data Platform and Hadoop Primer
 
SQL Server Reporting Services Disaster Recovery Webinar
SQL Server Reporting Services Disaster Recovery WebinarSQL Server Reporting Services Disaster Recovery Webinar
SQL Server Reporting Services Disaster Recovery Webinar
 
Ensuring compliance of patient data with big data and bi [bdii 301-m] - (4078)
Ensuring compliance of patient data with big data and bi [bdii 301-m] - (4078)Ensuring compliance of patient data with big data and bi [bdii 301-m] - (4078)
Ensuring compliance of patient data with big data and bi [bdii 301-m] - (4078)
 

Similaire à SQL Server 2014 Memory Optimised Tables - Advanced

SQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTPSQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTPTony Rogerson
 
Why you should care about data layout in the file system with Cheng Lian and ...
Why you should care about data layout in the file system with Cheng Lian and ...Why you should care about data layout in the file system with Cheng Lian and ...
Why you should care about data layout in the file system with Cheng Lian and ...Databricks
 
Best Practices for Migrating Your Data Warehouse to Amazon Redshift
Best Practices for Migrating Your Data Warehouse to Amazon RedshiftBest Practices for Migrating Your Data Warehouse to Amazon Redshift
Best Practices for Migrating Your Data Warehouse to Amazon RedshiftAmazon Web Services
 
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...Michael Rys
 
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...European SharePoint Conference
 
Dissecting Scalable Database Architectures
Dissecting Scalable Database ArchitecturesDissecting Scalable Database Architectures
Dissecting Scalable Database Architectureshypertable
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStoreMariaDB plc
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]Speedment, Inc.
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]Malin Weiss
 
HBase in Practice
HBase in PracticeHBase in Practice
HBase in Practicelarsgeorge
 
Novedades SQL Server 2014
Novedades SQL Server 2014Novedades SQL Server 2014
Novedades SQL Server 2014netmind
 
AWS re:Invent 2016: Streaming ETL for RDS and DynamoDB (DAT315)
AWS re:Invent 2016: Streaming ETL for RDS and DynamoDB (DAT315)AWS re:Invent 2016: Streaming ETL for RDS and DynamoDB (DAT315)
AWS re:Invent 2016: Streaming ETL for RDS and DynamoDB (DAT315)Amazon Web Services
 
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAmazon Web Services
 

Similaire à SQL Server 2014 Memory Optimised Tables - Advanced (20)

SQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTPSQL Server 2014 In-Memory OLTP
SQL Server 2014 In-Memory OLTP
 
SQLServer Database Structures
SQLServer Database Structures SQLServer Database Structures
SQLServer Database Structures
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
Deep Dive on Amazon Redshift
Deep Dive on Amazon RedshiftDeep Dive on Amazon Redshift
Deep Dive on Amazon Redshift
 
Why you should care about data layout in the file system with Cheng Lian and ...
Why you should care about data layout in the file system with Cheng Lian and ...Why you should care about data layout in the file system with Cheng Lian and ...
Why you should care about data layout in the file system with Cheng Lian and ...
 
Best Practices for Migrating Your Data Warehouse to Amazon Redshift
Best Practices for Migrating Your Data Warehouse to Amazon RedshiftBest Practices for Migrating Your Data Warehouse to Amazon Redshift
Best Practices for Migrating Your Data Warehouse to Amazon Redshift
 
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
Best Practices and Performance Tuning of U-SQL in Azure Data Lake (SQL Konfer...
 
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
SQL Server and SharePoint - Best Practices presented by Steffen Krause, Micro...
 
Dissecting Scalable Database Architectures
Dissecting Scalable Database ArchitecturesDissecting Scalable Database Architectures
Dissecting Scalable Database Architectures
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
 
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
JavaOne2016 - Microservices: Terabytes in Microseconds [CON4516]
 
HBase in Practice
HBase in Practice HBase in Practice
HBase in Practice
 
HBase in Practice
HBase in PracticeHBase in Practice
HBase in Practice
 
L6.sp17.pptx
L6.sp17.pptxL6.sp17.pptx
L6.sp17.pptx
 
1650607.ppt
1650607.ppt1650607.ppt
1650607.ppt
 
Novedades SQL Server 2014
Novedades SQL Server 2014Novedades SQL Server 2014
Novedades SQL Server 2014
 
AWS re:Invent 2016: Streaming ETL for RDS and DynamoDB (DAT315)
AWS re:Invent 2016: Streaming ETL for RDS and DynamoDB (DAT315)AWS re:Invent 2016: Streaming ETL for RDS and DynamoDB (DAT315)
AWS re:Invent 2016: Streaming ETL for RDS and DynamoDB (DAT315)
 
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
 

Dernier

April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...amitlee9823
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...karishmasinghjnh
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Pooja Nehwal
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...amitlee9823
 
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...amitlee9823
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...only4webmaster01
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 

Dernier (20)

April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night StandCall Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Attibele ☎ 7737669865 🥵 Book Your One night Stand
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
 
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men  🔝Thrissur🔝   Escor...
➥🔝 7737669865 🔝▻ Thrissur Call-girls in Women Seeking Men 🔝Thrissur🔝 Escor...
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Nandini Layout ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 

SQL Server 2014 Memory Optimised Tables - Advanced

  • 1.
  • 2. SQL Server 2014 In-Memory Tables (Extreme Transaction Processing) Advanced Tony Rogerson, SQL Server MVP @tonyrogerson tonyrogerson@torver.net http://www.sql-server.co.uk
  • 3.
  • 4.
  • 5. Who am I? • Freelance SQL Server professional and Data Specialist • Fellow BCS, MSc in BI, PGCert in Data Science • Started out in 1986 – VSAM, System W, Application System, DB2, Oracle, SQL Server since 4.21a • Awarded SQL Server MVP yearly since 97 • Founded UK SQL Server User Group back in ’99, founder member of DDD, SQL Bits, SQL Relay, SQL Santa and Project Mildred • Interested in commodity based distributed processing of Data. • I have an allotment where I grow vegetables - I do not do any analysis on how they grow, where they grow etc. My allotment is where I escape technology.
  • 6. Agenda • Define concept “In-Memory” • Test Harness • Storage • Row Chains • Indexing – Hash – Bw Tree and B+ Tree – Multi-Version Concurrency Control (MVCC) • Monitoring
  • 8. What is IMDB / DBIM? • Entire database resides in Main memory • Hybrid - selective tables reside entirely in memory • Row / Column store – Oracle keeps two copies of the data – in row AND column store – optimiser chooses – SQL Server 2014 you choose – • Columnstore (Column Store Indexing) – traditionally for OLAP • Rowstore (memory optimised table with hash or range index) – traditionally for OLTP • Non-Volatile Memory changes everything – it’s here now! – SQL Server 2014 Buffer Pool Extensions
  • 9. SQL Server “in-memory” • Column Store (designed for OLAP) – Column compression to reduce memory required – SQL 2012: • One index per table, nonclustered only, table read-only – SQL 2014: • Only index on table – clustered, table is now updateable • Memory Optimised Tables (designed for OLTP) – Standard CREATE TABLE with restrictions on FK’s and other constraints
  • 10. Traditional Tables: Buffer Pool usage (Read) Data on Stable Storage (Disk/SSD) Buffer Pool (Server Memory 60GB) Table (500GB) • 500GB does not fit into 60GB! • Buffer pool (the cache) allows us to read tables larger than available memory
  • 11. Traditional Tables: Buffer Pool usage (Write) Data on Stable Storage (Disk/SSD) Buffer Pool (Server Memory 60GB) Table (500GB) • 500GB does not fit into 60GB! • Buffer pool (the cache) + Transaction Log allow us to write tables larger than available memory • Penalty for that ability!
  • 13. Test Harness In-mem P01 In-mem P02 On-store P01 Data in last 5 minutes Older than 5 minutes Logical Table (VIEW) insert / update / delete Routing table controls which in-memory table the insert should go to. (INSTEAD OF trigger) 0 1
  • 14. Test harness operations • 10 connections each inserting 500 rows in a single transaction, running every 15 seconds with a random delay of 0 – 10 seconds. • Manual Runs: – Move rows older than 5 minutes from in-memory into on- storage tables – Update rows
  • 15. DEMO • CREATEDB.sql • PARTITIONING.sql • EXEC.sql • AGENT JOBS.sql (enable the jobs)
  • 18. Transaction Logging • All data is “in-memory” – WAL not required • On COMMIT TRAN – Checks made depending on Isolation – Data made Durable (to Checkpoint File Pair (CFP)) • Versions of rows kept in memory (see MVCC) • COMMIT is dramatically quicker because – Less data logged • no UNDO • no INDEX records • multiple log records combined grouped together to reduce log header overhead – Bulked IO
  • 19. Storage Traditional “on-storage” tables Memory Optimised tables (CFP – Checkpoint File Pairs) Storage of meta-data and compiled version of Native Compiled Procs and Tables. • System tables used for “some” MOT meta-data • MOT have their own set of DMV’s
  • 20. How MOT use FILESTREAM • Multiple Files – Data >= 16MiB or 128MiB files, stores row data – Delta >= 1MiB or 8MiB stores tombstone information – Data/Delta may be larger if long running transactions • All reads and writes are sequential • Offline Checkpoint Worker – Reads log – Appends to Data / Delta files – Random IO is not required!
  • 21. Life of a Row Version Memory CFP (Data / Delta) CFP (Data / Delta ) No active rows 3. MERGE 4. GARBAGE COLLECT 2. CHECKPOINT 1. Write to storage LDF – offline checkpoint worker writes to CFP 2. Close CFP and mark ACTIVE (Durable Checkpoint established) 3. ACTIVE CFP’s with >= 50% free space can be merged. 4. Files with no active rows can be deleted
  • 22. CHECKPOINT • After 512MiB data written to log or Manual CHECKPOINT • CFP state: UNDER CONSTRUCTION (on recovery, data taken from transaction log) • On CHECKPOINT – UNDER CONSTRUCTION CTP closed, becomes ACTIVE – Now have a durable checkpoint
  • 24. Life of a Row Version Memory CFP (Data / Delta) CFP (Data / Delta ) No active rows 3. MERGE 4. GARBAGE COLLECT 2. CHECKPOINT 1. Write to storage LDF – offline checkpoint worker writes to CFP 2. Close CFP and mark ACTIVE (Durable Checkpoint established) 3. ACTIVE CFP’s with >= 50% free space can be merged. 4. Files with no active rows can be deleted
  • 25. Row Updates • Actually DELETE and INSERT • Delete marker (not the row) is stored in DELTA file • INSERT is stored in DATA file • Versions hang around until no other sessions require them
  • 26. Garbage Collection • Before GC can be performed: – Rows get Durabilised  to storage on COMMIT – Checkpoint File Pairs grow, new ones created – Various CFP will contain the “current” rows we want in case of a failure [remember – log gets backed up and truncated] – Merge CFP into a new one – pull out current rows into a new CFP • CFP end up containing just old row versions no longer required • GC removes old CFP’s (FILESTREAM GC)
  • 27. SQL Server Memory Pools Stable Storage (MDF/NDF Files) Buffer Pool Table Data Data in/out as required Memory Internal Structures (proc/log cache etc.) SQL Server Memory Space Memory Optimised Tables FINITE ELASTIC
  • 29. Hash Indexing bucket_position = f hash( data ) Hash is deterministic (same value in gives same value out)
  • 30. The hash is the position in the memory map table Bucket position
  • 31. Hash Collisions • Example:1 million unique values hashed into 5000 hash values? – Multiple unique values mush hash to the same hash value • Multiple key (real data) values hang off same hash bucket • Termed: Row Chain – Chain of connected rows • SQL Server 2014 Hash function is Balanced and follows a Poisson distribution – 1/3 empty, 1/3 at least one index key and 1/3 containing two index keys
  • 32. Link from Memory Map Table to first row in Row Chain
  • 33. Memory Optimised Table Row Header Up-to 8 Index Memory Pointers • Above is a 3 row – row chain, all three rows hash to bucket #3 • Most recent row is first row in chain • Rows in stable storage • accessed using files, pages and extents • Rows in memory optimised • accessed using memory pointers Memory Location Hash Index
  • 35. Row Header – Multiple Index Pointers Data Rows (Index #‘x’ Pointer is next memory pointer in ‘row’ chain) Memory Pointers per Hash Bucket Row chain is defined through the Row Header
  • 36. Hash Index Scan • Scan follows Hash Index (8 byte per bucket) • Jump to each fist row in row chain • Read row chain (lots of bytes per row – header + data)
  • 37. BUCKET_COUNT options 1024 – 8 kilobytes 2048 – 16 kilobytes 4096 – 32 kilobytes 8192 – 64 kilobytes 16384 – 128 kilobytes 32768 – 256 kilobytes 65536 – 512 kilobytes 131072 – 1 megabytes 262144 – 2 megabytes 524288 – 4 megabytes 1048576 – 8 megabytes 2097152 – 16 megabytes 4194304 – 32 megabytes 8388608 – 64 megabytes 16777216 – 128 megabytes 33554432 – 256 megabytes 67108864 – 512 megabytes 134217728 – 1,024 megabytes 268435456 – 2,048 megabytes 536870912 – 4,096 megabytes 1073741824 – 8,192 megabytes
  • 38. What makes a Row Chain grow? • Hash collisions • Row versions from updates – An update is a {delete, insert} • Late garbage collection because of long running transactions • Garbage collection can’t keep up because of box load and amount to do {active threads do garbage collection on completion of work}
  • 39. Range Index (Bw Tree ≈ B+Tree) 8KiB 1 row tracks a page in level below Root Leaf Leaf row per table row {index-col}{pointer} B+ Tree
  • 40. Range Index (Bw Tree ≈ B+Tree) 8KiB 1 row tracks a page in level below Root Leaf Leaf row per table row {index-col}{pointer} B+ Tree
  • 41. Range Index (Bw Tree ≈ B+Tree) Bw Tree 8KiB Root Leaf Leaf row per unique value {index-col}{memory-pointer} Row Chain
  • 42. Range Index (Bw Tree ≈ B+Tree) 8KiB 1 row tracks a page in level below Root Leaf Leaf row per table row {index-col}{pointer} Bw TreeB+Tree 8KiB Root Leaf Leaf row per unique value {index-col}{memory-pointer} Row Chain ≈
  • 43. Multi-Version Concurrency Control (MVCC) • Compare And Swap replaces Latching • Update is actually INSERT and Tombstone • Row Versions [kept in memory] • Garbage collection task cleans up versions no longer required (stale data rows) • Version not required determined by active transactions and snapshot the connection has of the data • Your in-memory table can double, triple, x 100 etc. in size depending on access patterns (data mods + query durations)
  • 44. Versions in the Row Chain Newest Oldest TS_START TS_END Connection 2 NULL 55 7 NULL 60 50 NULL 80
  • 45. Versions in the Row Chain Newest Oldest TS_START TS_END Connection 2 10 55 7 NULL 60 50 NULL 80 Tombstone
  • 46. Versions in the Row Chain Current TS_START TS_END Connection 2 NULL 55 7 NULL 60 50 NULL 80 Tombstone
  • 47. The problem with Versions • Available memory is finite • All data must fit in memory • You may well run out of memory!! • Removal of versions from memory is not immediate
  • 48. Monitoring • sys.hash_indexes • sys.dm_db_xtp_hash_index_stats • sys.dm_db_xtp_table_memory_stats • sys.dm_db_xtp_index_stats • sys.dm_db_xtp_object_stats
  • 49. Summary • Memory is finite • Access patterns – Watch your long running transactions – COMMIT is now your friend (batch up) – Version creation is your enemy • Consider Index strategy very careful and monitor

Notes de l'éditeur

  1. Far from Hekaton being an extension of DBCC PINTABLE, it’s a huge new piece of functionality that can significantly improve the scalability of various data based scenarios – not just OLTP but also ETL and real-time BI. This session will introduce Hekaton features, how and when to use it; it will be demo led giving Hekaton end-to-end: enabling it, create tables, index design, query considerations, native stored procedures, durability [or not], introduce methods of identifying what to put in memory or not.
  2. http://www.databasejournal.com/features/mssql/understanding-new-column-store-index-of-sql-server-2012.html http://msdn.microsoft.com/en-us/library/gg492088.aspx
  3. http://blogs.technet.com/b/dataplatforminsider/archive/2014/01/16/storage-allocation-and-management-for-memory-optimized-tables.aspx