SQL Clone
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
Old Hand
Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)

Group: General Forum Members
Points: 360 Visits: 767
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
SSCoach
SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)SSCoach (15K reputation)

Group: General Forum Members
Points: 15098 Visits: 18597
Very interesting, wouldn't jump to any conclusions yet, what are the server specs? Disk and mem I/O?
cheshirefox
cheshirefox
Old Hand
Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)Old Hand (360 reputation)

Group: General Forum Members
Points: 360 Visits: 767
Great question - server is huge.

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

Unfortunately, hardware isn't the issue.
HowardW
HowardW
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2243 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 (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)SSC Rookie (42 reputation)

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

Group: General Forum Members
Points: 247 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 Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86009 Visits: 41095
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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
wBob
wBob
Valued Member
Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)

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

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

Group: General Forum Members
Points: 15098 Visits: 18597
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