Microsoft SQL Server 2014 Unleashed
by Ray Rankins, Paul Bertucci, Chris Gallelli, Alex T. Silverstein
Memory-Optimized Table Variables
You can create memory-optimized table variables in SQL Server 2014. Memory-optimized table variables behave the same as regular table variables, but are stored in your database’s memory space only and do not utilize tempdb. You can consider using memory-optimized table variables anywhere, as they are not transactional and can help relieve tempdb contention.
SQL Server 2014 does not support the inline creations of table variables however. It must be based on a memory-optimized table type. The reason for this limitation is because SQL Server needs to compile a DLL for the memory-optimized table type which wouldn’t be possible with dynamic in-line creation of a table variable.
The following example creates a memory-optimized ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access