How would you decide whether a specific table in your application is a good candidate for conversion to a memory optimized table?
Short answer
You would look for tables experiencing significant contention from many concurrent transactions, such as heavy locking or blocking shown in wait statistics, combined with a workload dominated by short, simple transactions, since memory optimized tables offer the biggest benefit…
Advertisement
AModel answer
You would look for tables experiencing significant contention from many concurrent transactions, such as heavy locking or blocking shown in wait statistics, combined with a workload dominated by short, simple transactions, since memory optimized tables offer the biggest benefit for exactly this kind of high concurrency, high throughput scenario rather than complex analytical queries.
-- Check for high contention on a specific table
SELECT * FROM sys.dm_db_index_operational_stats(DB_ID(), OBJECT_ID('Orders'), NULL, NULL)
WHERE row_lock_wait_count > 0;Real-world example
A team identifies their session tracking table as an ideal candidate for conversion to memory optimized after noticing significant lock contention during peak traffic, achieving a substantial performance improvement after migrating it.
Likely follow-ups
- What tables are generally poor candidates for memory optimization?
- How much memory does converting a large table to memory optimized actually require?
Related topics