SQL SERVER 2016 – Creating Clustered ColumnStore with InMemory OLTP Tables

I have been writing a lot of my findings with SQL Server 2016 in the recent past. This is also being something I have been investing big time keeping my session at SQLPASS coming in the October timeframe. I will be talking on a number of capabilities and enhancements around SQL Server 2016 from a performance standpoint that it is critical for me to explore some. I invest considerable time in preparation for any session and every single year going to SQLPASS has been the highlight and most of the time it is about hard work to make sure everyone attending my session gets the best of content. Also, it is a great way for me to do due diligence and homework as I prepare with real world problem statement with possible alternatives and solutions as part of my session. Let us learn about Creating Clustered ColumnStore with InMemory OLTP Tables.

One of the enhancements that I have been exploring to do in my session is what Microsoft calls as – “Operational Analytics”. It is a powerful enhancement because now we will be able to create a CloumnStore index on top of an InMemory OLTP. This means we will be able to get significant performance improvement in query and DML operations when it comes to InMemory OLTP.

Let me show what a typical construct look for creating this hybrid syntax:

-- Table to create Clustered ColumnStore on
-- top of InMemory OLTP
CREATE TABLE dbo.SalesOrder
(
ord_id INT IDENTITY(1,1) NOT NULL,
ord_dt DATETIME NOT NULL,
ord_stat INT NOT NULL,
RegionID INT NOT NULL,
Ord_Qty INT,
SalesAmount FLOAT NOT NULL,
INDEX SalesOrder_CCI CLUSTERED COLUMNSTORE,
CONSTRAINT pk_Sales_Ord_ID PRIMARY KEY NONCLUSTERED HASH (ord_id) WITH (BUCKET_COUNT = 100000)
) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA)
GO

There is nothing strange about this code. Having said that, we can check on the Indexes created which are shown below:

SQL SERVER 2016 - Creating Clustered ColumnStore with InMemory OLTP Tables CCI-InMemory-01-800x225

I would like to understand if you have started using InMemory OLTP in your applications? What are the scenarios have you been using? Please drop me a line and I would be more than interested in learning from you too. Also, let me know if you will be using this combination of CCI with InMemory OLTP?

Reference: Pinal Dave (https://blog.sqlauthority.com)

, , , , ,
Previous Post
SQL SERVER – Performance Choice – Coding or Automation
Next Post
SQL SERVER – Performance Analysis of Backup to Azure

Related Posts

Leave a Reply

Menu