3. Davide Mauri
18 Years of experience on the SQL Server Platform
Specialized in Data Solution Architecture, Database
Design, Performance Tuning, Business Intelligence
Projects, Consulting, Mentoring & Training
Regular Speaker @ SQL Server events
Microsoft SQL Server MVP
President of UGISS (Italian SQL Server UG)
Mentor @ SolidQ
4. Hekaton – In Memory Tables
SQL Server 2014 introduce un in-memory engine in SQL
Server
E‟ possibile indicare che una tabella deve essere
ottimizzata per rimanere in memoria
Ottimizzata = Nuove strutture dati, utilizzo di MultiVersion
Concurrency Control per non avere locking
5. Hekaton – In Memory Tables
Performance estreme!
A parità di hardware si possono ottenere performance di
un ordine di grandezza superiore!
How Fast is Project Codenamed “Hekaton” – It‟s „Wicked
Fast‟!
Da 15.000 tps a 250.000 tps!
7. Hekaton – In Memory Tables
Memory_Optimized = On
Non vengono più utilizzati Extent e Pagine, ma Data Files
e Delta Files
I dati sono memorizzati in un formato nuovo, che usa il
FileStream
8. Hekaton – In Memory Tables
Durability
E‟ possibile decidere se persistere i dati oppure no
SCHEMA_AND_DATA
SCHEMA_ONLY
Il Transaction Log garantisce le proprietà ACID
9. Hekaton – In Memory Tables
Tipi di dati supportati
bit
tinyint, smallint, int, bigint
money, smallmoney
float, real
datetime, smalldatetime, datetime2, date, time
numeric and decimal types
Uniqueidentifier
10. Hekaton – In Memory Tables
Tipi di dati supportati ad esclusione dei LOB
(varxxx(MAX))
char(n), varchar(n), nchar(n), nvarchar(n)
binary(n), varbinary(n)
11. Hekaton – In Memory Tables
Altri limiti
No DML triggers
No FOREIGN KEY o CHECK constraints
No IDENTITY columns
No UNIQUE indexes (ad esclusione della PRIMARY KEY
)
Massimo 8 indici in totale
13. Hekaton – In Memory Tables
Nelle prossime puntate…
Indici specifici per Hekaton
Range & BW-Trees
Il modello MultiVersion Concurrency Control
Lock Free