My results of testing SQL Server 2014 with OLTP in memory Hekaton data with millions of records for potential HFT

(Last Updated On: February 20, 2014)
Learn the Secret

Get  our 2 Free Books

Get these now which land directly to their inbox.
Invalid email address

My results of testing SQL Server 2014 with OLTP in memory Hekaton data with millions of records for potential HFT

Here are the links I visited to accomplish this:

In-Memory OLTP Code Samples

Demonstration: Performance Improvement of In-Memory OLTP

Creating a Memory-Optimized Table and a Natively Compiled Stored Procedure

Under code sample of:

— insert 1,000,000 rows
DECLARE @StartId int = (SELECT MAX(ShoppingCartId)+1 FROM dbo.ShoppingCart)
EXEC usp_InsertSampleCarts @StartId, 1000000

—- verify the rows have been inserted
SELECT COUNT(*) FROM dbo.ShoppingCart

This seems to be the best test to measure performance with 1000000+ insertions and reads.

Do realize I pushed these insertions to 100 million + but I got:

DECLARE @StartId int = (SELECT MAX(ShoppingCartId)+1 FROM dbo.ShoppingCart)
EXEC usp_InsertSampleCarts @StartId, 100000000

Msg 701, Level 17, State 109, Procedure usp_InsertSampleCarts, Line 11
There is insufficient system memory in resource pool ‘default’ to run this query.

I was able to get performance of 1 second read of  SELECT COUNT(*) FROM dbo.ShoppingCart with 21,000,000 records.

It will chew up your system with these types of queries if you don’t have the right kind of processor or memory.

For my basic desktop of I7 with 8 gb probably can handle 1-2 million tops. The 21 million will chew up the processing time slicing of other applications and processes.
As a result, when you do go into live trading production, you will need a dedicated server or cluster with very fast processing power and memory to handle the data load you need. Azure could be helpful here.

Overall, I do see potential of using this for a high speed automated trading system but there will be a need of proper hardware allocation to accomplish this.

Although all tests were done using SQL Server Management Studio, I still have to test this with a C# application calling this same tested database.

Join my FREE newsletter to see other results on this

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!
This entry was posted in Uncategorized and tagged , , , , , , , , , on by .

About caustic

Hi i there My name is Bryan Downing. I am part of a company called QuantLabs.Net This is specifically a company with a high profile blog about technology, trading, financial, investment, quant, etc. It posts things on how to do job interviews with large companies like Morgan Stanley, Bloomberg, Citibank, and IBM. It also posts different unique tips and tricks on Java, C++, or C programming. It posts about different techniques in learning about Matlab and building models or strategies. There is a lot here if you are into venturing into the financial world like quant or technical analysis. It also discusses the future generation of trading and programming Specialties: C++, Java, C#, Matlab, quant, models, strategies, technical analysis, linux, windows P.S. I have been known to be the worst typist. Do not be offended by it as I like to bang stuff out and put priorty of what I do over typing. Maybe one day I can get a full time copy editor to help out. Do note I prefer videos as they are much easier to produce so check out my many video at