Introducing Hekaton The next step in SQL Server OLTP performance Mladen Prajdić
About me
First, a little history SQL Server 7.0 Sybase origins Completely rewritten storage engine New locking mechanism Data page from 2k to 8k Dynamic memory and file management
First, a little history SQL Server 2000 First 64bit version Multiple instances on single machine Materialized views and computed columns Proper clustering UDFs performance problems -> awesome for consultants XML Instead Of triggers -> updateable views
First, a little history SQL Server 2005 5 years DMV’s and DMF’s New snapshot transaction isolation levels Service Broker The basis for DB mirroring and Always ON DDL triggers CLR and XML integration T-SQL improvements
First, a little history SQL Server 2008 & 2008R2 New data types Spatial, Hierarchy, Date, Time, DateTime2, … Table Valued Parameters Filestream Resource governor CDC & CT Merge statement Compression
First, a little history SQL Server 2012 Always ON Contained Databases T-SQL enhancements Full Text Semantic Search Changed licensing In memory technologies (xVelocity) ColumnStore, Vertipaq, StreamInsight
SQL Server vNext HEKATON
HEKATON Hekaton = Greek for 100x In-Memory OLTP Built directly into DB engine High performance Fully ACID RDBMS are optimized for disk IO, SSDs help CPU clock frequency flattened -> multicore But… Memory started becoming cheap
HEKATON Computing power holds Moore Law due to parallelism CPU clock frequency stalled Memory has gotten a LOT cheaper
HEKATON - IO No locks, latches, spinlocks or lock manager No data pages or B-trees, row based Stream based, no random IO WAL guarantees ACID T-Log records are much, much smaller
HEKATON - CPU & Memory Separate from the SQL Server buffer pool User settable, part of MAX server memory No more memory it fails the operation Scales linearly with the number of CPUs Everything is done to minimize CPU cycles
HEKATON – T-SQL Stored procedures compile to C, then to machine code Bypasses the whole execution part in the engine Not everything is supported Calling a stored procedure is just a DLL entry point Nothing radically new to learn
HEKATON – Data Structures Lock free algorithms Type of MVCC Not in tempdb Fully supported for HA, Backups, Log Shipping, etc Durable and non durable tables Data lost on restarts, schema fixed Special filegroup, it’s filestream based Tables must be migrated to the Hekaton filegroup
HEKATON – Data Structures Bw-Tree index Lock free b-tree index Not a skip list Demonstrated by MS research two years ago Works on delta tables For more details there’s a research paper on it
HEKATON – Coding scenarios: Transaction/Sec Normal stored procedure and table Normal stored procedure and Hekaton table Hekaton stored procedure and table
HEKATON – Coding scenarios: CPU Normal stored procedure and table Normal stored procedure and Hekaton table Hekaton stored procedure and table
QUESTIONS After the session please fill out the questionnaire. Questionnaires will be sent to you by and will be available in the profile section of the NT Conference website Thank you! ?