Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Introducing Microsoft SQL Server 2019

You're reading from   Introducing Microsoft SQL Server 2019 Reliability, scalability, and security both on premises and in the cloud

Arrow left icon
Product type Paperback
Published in Apr 2020
Publisher Packt
ISBN-13 9781838826215
Length 488 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (8):
Arrow left icon
Allan Hirt Allan Hirt
Author Profile Icon Allan Hirt
Allan Hirt
Dustin Ryan Dustin Ryan
Author Profile Icon Dustin Ryan
Dustin Ryan
Mitchell Pearson Mitchell Pearson
Author Profile Icon Mitchell Pearson
Mitchell Pearson
Kellyn Gorman Kellyn Gorman
Author Profile Icon Kellyn Gorman
Kellyn Gorman
Dave Noderer Dave Noderer
Author Profile Icon Dave Noderer
Dave Noderer
Buck Woody Buck Woody
Author Profile Icon Buck Woody
Buck Woody
Arun Sirpal Arun Sirpal
Author Profile Icon Arun Sirpal
Arun Sirpal
James Rowland-Jones James Rowland-Jones
Author Profile Icon James Rowland-Jones
James Rowland-Jones
+4 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Optimizing for performance, scalability and real‑time insights 2. Enterprise Security FREE CHAPTER 3. High Availability and Disaster Recovery 4. Hybrid Features – SQL Server and Microsoft Azure 5. SQL Server 2019 on Linux 6. SQL Server 2019 in Containers and Kubernetes 7. Data Virtualization 8. Machine Learning Services Extensibility Framework 9. SQL Server 2019 Big Data Clusters 10. Enhancing the Developer Experience 11. Data Warehousing 12. Analysis Services 13. Power BI Report Server 14. Modernization to the Azure Cloud

Disk-based tables versus memory-optimized tables

There are several differences between memory-optimized and disk-based tables.

One difference is the fact that, in a disk-based table, rows are stored in 8k pages and a page only stores rows from a single table. With memory-optimized tables, rows are stored individually, such that one data file can contain rows from multiple memory-optimized tables.

Indexes in a disk-based table are stored in pages just like data rows. Index changes are logged, as are data row changes. A memory-optimized table persists the definition of the index but is regenerated each time the memory-optimized table is loaded, such as restarting the database. No logging of index "pages" is required.

Data operations are much different. With a memory-optimized table, all operations are done in memory. Log records are created when an in-memory update is performed. Any log records created in-memory are persisted to disk through a separate thread. Disk-based table operations may perform in-place updates on non-key-columns, but key-columns require a delete and insert. Once the operation is complete, changes are flushed to disk.

With disk-based tables, pages may become fragmented. As changes are made, there may be partially filled pages and pages that are not consecutive. With memory-optimized tables, storing as rows removes fragmentation, but inserts, deletes, and updates will leave rows that can be compacted. Compaction of the rows is executed by means of a merge thread in the background.

Additional information can be found at this Microsoft docs link:

https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/comparing-disk-based-table-storage-to-memory-optimized-table-storage?view=sql-server-2017.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime