Memory Optimized tables - large data sets

  • 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?

  • Very interesting, wouldn't jump to any conclusions yet, what are the server specs? Disk and mem I/O?

  • Great question - server is huge.

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

    Unfortunately, hardware isn't the issue.

  • 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.

  • not sure what you're trying to do, but have you tried the clustered columnstore feature instead?

  • 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

  • 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) 😀

    --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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • See my reply here on a similar issue:

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

  • wBob (4/3/2014)


    See my reply here on a similar issue:

    http://www.sqlservercentral.com/Forums/Topic1557258-3411-2.aspx%5B/quote%5D

    Thanks!

    😎

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply