Memory optimized OLTP database engine for SQL Server
Memory-optimized OLTP database engine (In-Memory OLTP) support tables
which reside in memory ( Memory-Optimized Tables) and Natively
Compiled Stored Procedures ( Create Procedure code translated into native
machine code and compiled into a DLL and loaded into memory )
SQL Server 2014
Advantages:
- Memory-Optimized Tables
·
High Performance increase: Unlike the usual Disk-based tables, all the data is stored in
memory, all the time. Pages do not need to be read into cache from disk when the memory-optimized tables are accessed.
·
For memory-optimized tables, there are no locks
acquired, and thus no waiting because of blocking.
·
Concurrency improvements: When accessing memory-optimized tables, SQL Server implements an
optimistic multi-version concurrency control.
·
Hash Indexes on memory-optimized tables uses
Bw-tree structure and resides in memory.
- Native stored procedures:
·
Procedure loaded into memory in native code
consisting of processor instructions that can be executed directly by the CPU,
without the need for further compilation or interpretation. Syntax:
Eg:
- Memory-Optimized Tables
C1 int not null primary key NONCLUSTERED HASH WITH (BUCKET_COUNT=2000000)
) with (MEMORY_OPTIMIZED=ON)
- Natively Compiled Stored Procedures
AS
BEGIN ATOMIC with (TRANSACTION ISOLATION LEVEL=snapshot, LANGUAGE=N'us_english')
Select 1
END
Comments
Post a Comment