In-Memory Analytics: What’s Different Between SQL Server and Oracle

Pick a memory, any memory.
Pick a memory, any memory.

Both Microsoft and Oracle have released what they call “in-memory analytics” features. Microsoft started two years ago with SQL Server 2012 and Oracle is following suit next month (July 2014) with the Oracle In-Memory Analytics feature. Most of us won’t pick our database platform based on just one feature, but it’s important to know the difference between these two so you can have a better discussion around the technical choices that you’re making.

SQL Server Columnstore Indexes

When they first arrived, SQL Server columnstore indexes were touted as memory optimized. By using a columnar data structure and columnar compression techniques, SQL Server columnstore indexes are able to get tremendous improvements in performance.

In effect, SQL Server columnstore indexes are “in-memory” because of the effects of columnar compression. The compression means that the index size is significantly smaller. It’s likely that the whole index can be cached in memory and will stay in memory because the index smaller.

By thinking smarter, Microsoft created a technology that allowed BI professionals to achieve significant speeds on data warehouses. There was one problem: the SQL Server 2012 columnstore was read-only.

SQL Server 2014 columnstore fixed the read-only problem by introducing a writable clustered columnstore. When the index is created as a clustered columnstore index (it’s the only index on the table) SQL Server will use a writable deltastore to hold data. This advantage over SQL Server 2012 has prompted many teams to migrate to SQL Server 2014.

The downside of both SQL Server columnstore implementations is that they’re designed for pure data warehouse workloads. If you wanted to combine an OLTP workload with a data warehouse workload on the same system, you’d have some work head of you to build something that would work with both regular indexes and columnstore indexes. At its core, SQL Server columnstore technology is a data warehouse technology.

Oracle Database In-Memory

Oracle Database In-Memory takes a different approach to SQL Server. The Oracle feature is designed to be a transparent drop-in. Rather than require a separate physical structure on disk, a DBA will activate the in-memory feature for a given table and wait as Oracle does the rest.

Oracle does this by creating a dual-format data structure. As data is read and written to tables using the in-memory feature, the database builds columnar indexes in-memory and on-the-fly. Yes, this means that you’ll need more memory in your database servers. Many Oracle customers use Oracle RAC for scale-out performance improvements. Dedicating one RAC node to reporting isn’t unheard of and can be used to alleviate the pressure caused by holding a second, albeit compressed, copy of a table or index in memory.

Once the row-level data has been merged into the columnar index, Oracle uses compression to further improve performance. Just like other columnar database engines, compression vastly improves the performance of queries.

Oracle’s offering doesn’t persist the in-memory analytic indexes to disk – they’re purely in-memory indexes. This avoids the overhead of logging and persisting them to disk. The double write hit is avoided. However, there’s one problem with this technology – restarts. Whenever the database engine is restarted, the in-memory analytic indexes will have to be rebuilt from disk.

Technical details about the Oracle offering are sparse – we can expect to learn more after Oracle has released the feature to the public.

Comparing In-Memory Analytics

While both companies have produced an in-memory analytic feature of one form or another, direct comparisons are difficult. Microsoft SQL Server columnstore indexes are designed to improve pure data warehouse implementations. Oracle Database In-Memory, on the other hand, is intended to help DBAs get the most out of the hardware they already have. Many business users want to report on live data and this feature makes live reporting a possibility.

Previous Post
Sizing SQL Server for AWS
Next Post
Announcing the SQL Server Setup Checklist: Free eBook Download

3 Comments. Leave new

  • Hi Jeremiah,

    I don’t think you should be comparing SQL Server’s Columnar Index with Oracle’s In Memory. I think the proper comparison should be SQL Server’s Columnar Index with Oracle’s HCC (Hybrid Columnar Compresson). Altought exclusive to Oracle Storage (Exadata, Pillar and ZFS only) – it’s a much closer match as both are “on disk” formats that are read into RAM and processed. Exadata been significantly faster as it does the decompression and filtering in dedicated storage servers.

    A major implementation difference between Oracle’s HCC and SQL Server’s Columnar Storage is that Oracle’s compression integrates much better with the rest of the features. For example you can build additional indexes, altought usually only bitmap indexes make sense. A disadvantage is that only direct load operations load data compressed and there is no automatic “delta store” compression in the background.
    But all forms of replication, backups and etc work as expected, which is not the case in SQL Server’s columnar storage implementation.

    Oracle’s InMemory option is a datawarehouse feature, which allows you to use your RAM as a data store, and leverage vector CPU processing for certain filter predicates. So the CPU optimization is the important factor here. In my tests, Oracle’s InMemory can filter 1 billion rows per second per core.


Leave a Reply

Your email address will not be published.

Fill out this field
Fill out this field
Please enter a valid email address.