In Memory OLTP Not Just for OLTP
Russ Thomas Twitter: @SQLJudo Blog: www.sqljudo.com Plural Sight: coming soon ! 2 | 4/23/2019 | @SQLJudo - Russ Thomas DBA
Drawbacks of Memory Expensive Volatile Precious Local Not a file system
Benefits of Memory Fast
In Memory OLTP (“hekaton”) MAGIC UNICORN VERSION WAS ALREADY TAKEN BY APPLE
Limitations (just a few) < 250GB (durable tables -> log is going to be disk based) < 8060 byte row No unique indexes No calculated columns No foreign keys No partitioning No check constraints No alter statements No table locks No truncate Non integer indexes must be binary collation No adding indexes after creation Row versioning protects data, true collisions generate error
Why OLTP Size Concurrency Speed < 250GB No Locks (row versioning) Reads and Writes
Why not staging tables ??? Size ( > 250GB schema only tables ) Heaps No constraints No foreign keys No indexes No alters
LIVE DEMO
Variables to Consider Memory Limit Storage Sub-structure Multi-threading / CPU cores # of Transformations Memory Limit Running out of memory is bad Storage Sub-structure PCIe vs Spinning Disks vs SSD Multi-threading / CPU cores Serial workloads to stay under memory limit may or may not be faster than parallel work loads from disk
But wait, there’s more Natively Compiled Objects Hash Indexes Columnstore Indexes coming !!
Russ Thomas Twitter: @SQLJudo Blog: www.sqljudo.com Plural Sight: coming soon ! 12 | 4/23/2019 | @SQLJudo - Russ Thomas DBA