මොඩියුල විශ්ලේෂණය Buffer Pool Extension භාවිතය. Columnstore Indexes ක්රියාත්මක කිරීම. In-Memory OLTP කිරීම. Memory Optimized Tables Memory Optimized Stored Procedures
Buffer Pool Extension භාවිතය. Data files (Disk) Buffer cache (RAM) Buffer cache extension (SSD) Pages Clean pages
Enabling Buffer Pool Extension
columnstore indexes හඳුන්වා දීම. Row Store Column Store ProductID OrderDate Cost 310 20010701 2171.29 311 1912.15 312 20010702 313 413.14 ProductID 310 311 312 313 314 315 316 317 318 319 320 321 OrderDate 20010701 … 20010702 20010703 20010704 Cost 2171.29 1912.15 413.14 333.42 1295.00 4233.14 641.22 24.95 64.32 1111.25 Data page 1000 ProductID OrderDate Cost 314 20010701 333.42 315 1295.00 316 20010702 4233.14 317 641.22 Data page 1001 Data page 2000 Data page 2001 Data page 2002
Columnstore Index වර්ග. Clustered columnstore indexes Nonclustered columnstore indexes
Columnstore Indexes
In-Memory OLTP…
Memory-Optimized Tables
Creating Memory-Optimized Tables (1) memory-optimized data සඳහා filegroup එකක් එකතු කිරීම ALTER DATABASE MyDB ADD FILEGROUP mem_data CONTAINS MEMORY_OPTIMIZED_DATA; GO ADD FILE (NAME = 'MemData' FILENAME = 'D:\Data\MyDB_MemData.ndf') TO FILEGROUP mem_data;
Creating Memory-Optimized Tables (2) CREATE TABLE dbo.MemoryTable (OrderId INTEGER NOT NULL PRIMARY KEY NONCLUSTERED HASH WITH (BUCKET_COUNT = 1000000), OrderDate DATETIME NOT NULL, ProductCode INTEGER NULL, Quantity INTEGER NULL) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA);
Memory-Optimized Tables Query කිරීම. Query Interop Native Compilation Native Compilation CREATE PROCEDURE… #define __in HRESULT hkp_(… 0110101101 Transact-SQL SELECT t1.col1, t3.col2 FROM Tab1 t1 JOIN Tab2 t2 ON t1.Col1 = t2.col1; Translate to C Compile to DLL Query Interop Memory-Optimized Tables Disk-Based Tables Tab1 Tab2 Tab3 Tab4
Memory-Optimized Tables
Natively Compiled Stored Procedures CREATE PROCEDURE dbo.DeleteCustomer @CustomerID INT WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS OWNER AS BEGIN ATOMIC WITH (TRANSACTION ISOLATION LEVEL = SNAPSHOT; LANGUAGE = 'us_English') DELETE dbo.OpenOrders WHERE CustomerID = @CustomerID DELETE dbo.Customer WHERE CustomerID = @CustomerID END;
Natively Compiled Stored Procedure
In-Memory Objects සම්පිණ්ඩනය Buffer Pool Extension භාවිතය. Columnstore Indexes ක්රියාත්මක කිරීම. In-Memory OLTP කිරීම. Memory Optimized Tables Memory Optimized Stored Procedures