

To estimate memory size required for your data, consult the topicĮstimate Memory Requirements for Memory-Optimized Tables In addition, both Standard Edition and Express Edition each database a quota for data stored in memory-optimized tables. Therefore, you need to ensure you have enough memory for the data stored in memory-optimized tables. These tables are required to fit in memory. In-Memory OLTP includes memory-optimized tables, which are used for storing user data. Memory quota in Express and Standard Editions You will find a Transact-SQL script showing an example for each of these types of objects towards the end of this post. Plus, you can have both memory-optimized and traditional disk-based tables in the same database, and run queries across the two. And because these objects behave very similar to their traditional counterparts, you can often gain performance benefits while making only minimal changes to the database and the application.

In-Memory OLTP is built into SQL Server, and starting SP1, you can use all these objects in any edition of SQL Server. At this time, the following T-SQL modules can be natively compiled: stored procedures, triggers and scalar user-defined functions. You declare a Transact-SQL module to be natively compiled at create time. Table variables and TVPs that are declared using a memory-optimized table type inherit the benefits of non-durable memory-optimized tables: efficient data access, and no IO.Īre used to further reduce the time taken for an individual transaction by reducing CPU cycles required to process the operations. These can be used instead of traditional table types. This avoids consuming log IO resources for cases where durability is not a concern.Īre used for table-valued parameters (TVPs), as well as intermediate result sets in stored procedures. A non-durable table is a memory-optimized table that is declared with DURABILITY=SCHEMA_ONLY, meaning that changes to these tables do not incur any IO. You declare a table to be memory-optimized at create time.Īre used for transient data, either for caching or for intermediate result set (replacing traditional temp tables). To leverage In-Memory OLTP in your database, you use one or more of the following types of objects:Īre used for storing user data. In addition, In-Memory OLTP works with all high availability and disaster recovery capabilities of SQL Server, like AlwaysOn, backup/restore, etc. If there is a failure at any time after the transaction commits, your data is there when the database comes back online. By default, all transactions are fully durable, meaning that you have the same durability guarantees you get for any other table in SQL Server: as part of transaction commit, all changes are written to the transaction log on disk. Now, just because data lives in-memory does not mean you lose it when there is a failure.

Data storage, access, and processing algorithms were redesigned from the ground up to take advantage of the latest enhancements in in-memory and high concurrency computing. Now, where does this performance gain come from? In essence, In-Memory OLTP improves performance of transaction processing by making data access and transaction execution more efficient, and by removing lock and latch contention between concurrently executing transactions: it is not fast because itĪround the data being in-memory. With a single machine running SQL Server 2016, leveraging In-Memory OLTP. In-Memory OLTP can provide great performance gains, for the right workloads. We conclude with a sample script illustrating the In-Memory OLTP objects, and some pointers to get started. We go on to describe the scenarios for which you’d want to consider In-Memory OLTP. We then describe the resource/memory limitations in Express and Standard Edition. In this blog post we recap what the technology is. One of the outcomes is that In-Memory OLTP (aka Hekaton), the premier performance technology for transaction processing, data ingestion, data load, and transient data scenarios, is now available in SQL Server Standard Edition and Express Edition, as long as you have SQL Server 2016 SP1. With SP1 we made a push to bring a consistent programming surface area across all editions of SQL Server. The release of Service Pack 1 for SQL Server 2016.
