Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Memory Optimised Tables and Indexes

$
0
0
I'm just beginning to experiment with memory optimised tables. I have two sets of near identical tables - one set normal, the other set memory optimised with DURABILITY=SCHEMA_ONLY - and am running test queries against these. When I say that the two sets are "near identical", I mean that they are the same except for the primary keys: for the normal tables these are defined as PRIMARY KEY CLUSTERED whereas for the memory-optimed ones they are defined as PRIMARY KEY NONCLUSTERED HASH WITH (BUCKET_COUNT=nnnn) as per the requirements for such tables.I then run a pair of test queries, again identical but one referencing the normal tables and the other referencing the memory optimised ones.(The query uses an inner join on three tables with row counts of approx 3m rows, 100000 rows and 5000 rows.) Surprisingly - well it surprised me! - the query against the normal tables runs noticeably faster than that against the memory optimised ones. To try to find out why, I examined the execution plans. the plan for the memory optimised query suggests that I have a missing index: but of course I can't create this againsty a memory optimised table. Is this a bug or am I missing something? Are there any other pointers as to why the performance betwen the two should be so different?

Viewing all articles
Browse latest Browse all 3145

Trending Articles