Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Memory Optimized tables - large data sets


Memory Optimized tables - large data sets

Author
Message
cheshirefox
cheshirefox
SSC-Enthusiastic
SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)

Group: General Forum Members
Points: 177 Visits: 734
Hi -

I'm testing SQL 2014 - in particular, memory optimized tables. We loaded the memOptimized tables (2 Billion rows) from replica conventional tables. For clarity sake - we have conventional tables and memory optimized tables with the exact data set.

The specific table(s) we're testing has 5 columns (int, int, bigint, bigint and timestamp). We've created non-clustered and non-clustered hash indexes on the in-memory tables, performed dropCleanBuffers on the conventional table to purge tables from memory, etc. We're seeing index seeks in the execution plan on the InMem tables - but the performance is still lacking. Performance for simply count queries is terrible. For Count queries, we're getting results in 26 seconds on convetional tables, and 5+ minutes on the memory optimized tables.

Now the really interesting part - memory optimized tables to not support parallel plans.

The lack of parallel execution is what is causing such degradation.

Any advice? Anyone leveraging this functionality yet?
Eirikur Eiriksson
Eirikur Eiriksson
SSCertifiable
SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)

Group: General Forum Members
Points: 6714 Visits: 17699
Very interesting, wouldn't jump to any conclusions yet, what are the server specs? Disk and mem I/O?
cheshirefox
cheshirefox
SSC-Enthusiastic
SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)SSC-Enthusiastic (177 reputation)

Group: General Forum Members
Points: 177 Visits: 734
Great question - server is huge.

80 cores, 1 TB RAM, FusionIO cards (Flash) for all storage.

Unfortunately, hardware isn't the issue.
HowardW
HowardW
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1211 Visits: 9892
I think this misses the point of in-memory optimisation. A read query, like a count, especially on a 1TB RAM server is going to be entirely fulfilled from buffer cache regardless of table type and has the full weight of years of optimisation effort in the core engine (including parallelisation) when using regular tables.

In memory optimised tables were predominantly created for extremely high-concurrency OLTP, not for fast OLAP. A typical example cited is for database session management, with potentially millions of transactions per second reading and writing a single row each. This bogs down with traditional tables due to the complex stack of memory and disk layers, even with a very fast IO sub-system. This is a much more simple (and crude) method of storing data for these types of access patterns.

It's also a new feature, so things that are outside of the core use-case may be sub-optimal at this stage.
irabufan
irabufan
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 521
not sure what you're trying to do, but have you tried the clustered columnstore feature instead?
Andreas.Wolter
Andreas.Wolter
SSC-Enthusiastic
SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)

Group: General Forum Members
Points: 155 Visits: 1056
irabufan (3/26/2014)
not sure what you're trying to do, but have you tried the clustered columnstore feature instead?


+1

Andreas

---------------------------------------------------
MVP SQL Server
Microsoft Certified Master SQL Server 2008
Microsoft Certified Solutions Master Data Platform, SQL Server 2012
www.insidesql.org/blogs/andreaswolter
www.andreas-wolter.com
Jeff Moden
Jeff Moden
SSC-Forever
SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)SSC-Forever (45K reputation)

Group: General Forum Members
Points: 45079 Visits: 39910
HowardW (3/26/2014)
I think this misses the point of in-memory optimisation. A read query, like a count, especially on a 1TB RAM server is going to be entirely fulfilled from buffer cache regardless of table type and has the full weight of years of optimisation effort in the core engine (including parallelisation) when using regular tables.

In memory optimised tables were predominantly created for extremely high-concurrency OLTP, not for fast OLAP. A typical example cited is for database session management, with potentially millions of transactions per second reading and writing a single row each. This bogs down with traditional tables due to the complex stack of memory and disk layers, even with a very fast IO sub-system. This is a much more simple (and crude) method of storing data for these types of access patterns.

It's also a new feature, so things that are outside of the core use-case may be sub-optimal at this stage.


Heh... That's a "Hek" of a note (pun intended) :-D

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Wink

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
wBob
wBob
SSC Rookie
SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)

Group: General Forum Members
Points: 31 Visits: 576
See my reply here on a similar issue:

http://www.sqlservercentral.com/Forums/Topic1557258-3411-2.aspx
Eirikur Eiriksson
Eirikur Eiriksson
SSCertifiable
SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)

Group: General Forum Members
Points: 6714 Visits: 17699
wBob (4/3/2014)
See my reply here on a similar issue:

http://www.sqlservercentral.com/Forums/Topic1557258-3411-2.aspx


Thanks!
Cool
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search