内存中数据库系统和技术In-memory database systems and technologies

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

本页面旨在用作 SQL Server 中的内存中功能和技术的参考页面。This page is intended to serve as a reference page for in-memory features and technologies within SQL Server. 内存中数据库系统的概念是指利用新式数据库系统中可用的更大内存容量的数据库系统。The concept of an in-memory database system refers to a database system that has been designed to take advantage of larger memory capacities available on modern database systems. 内存中数据库本质上可以是关系数据库或非关系数据库。An in-memory database may be relational or non-relational in nature.

通常认为,内存中数据库系统的性能优势主要是由于,其访问驻留在内存中的数据比访问甚至最快的可用磁盘子系统上的数据更快(快几个数量级)。It is assumed often, that the performance advantages of an in-memory database system are mostly owing to it being faster to access data that is resident in memory rather than data that sitting on even the fastest available disk subsystems (by several orders of magnitude). 但是,许多 SQL Server 工作负载都可以将整个工作集放在可用内存中。However, many SQL Server workloads can fit their entire working set in available memory. 许多内存中数据库系统都可以将数据保存到磁盘中,并且可能无法始终将整个数据集放在可用内存中。Many in-memory database systems can persist data to disk and may not always be able to fit the entire data set in available memory.

关系数据库工作负载主要使用快速易失的高速缓存,该缓存面向相当慢但持久的介质。A fast volatile cache that fronts a considerably slower but durable media has been predominant for relational database workloads. 它需要特定方法来管理工作负载。It necessitates particular approaches to workload management. 更快的内存传输速率、更大的容量甚至是永久内存所带来的机遇,促进了新特性和技术的开发,这些新特性和新技术可以激发新的关系数据库工作负载管理方法。The opportunities presented by faster memory transfer rates, greater capacity, or even persistent memory facilitates the development of new features and technologies that can spur new approaches to relational database workload management.

混合缓冲池Hybrid buffer pool

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

混合缓冲池通过 SQL Server 2019 (15.x)SQL Server 2019 (15.x) 为驻留在适用于 Windows 和 Linux 平台的可字节寻址的永久内存存储设备上的数据库文件扩展缓冲池。Hybrid buffer pool expands the buffer pool for database files residing on byte-addressable persistent memory storage devices for both Windows and Linux platforms with SQL Server 2019 (15.x)SQL Server 2019 (15.x).

内存优化 tempdb 元数据Memory-optimized tempdb metadata

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

SQL Server 2019 (15.x)SQL Server 2019 (15.x) 引入了一个新功能,即内存优化 tempdb 元数据,它有效地消除了某些争用瓶颈,并为 tempdb 繁重的工作负载解锁了新级别的可伸缩性。introduces a new feature that is memory-optimized tempdb metadata, which effectively removes some contention bottlenecks and unlocks a new level of scalability for tempdb-heavy workloads.

内存中 OLTPIn-memory OLTP

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions)

内存中 OLTPSQL ServerSQL ServerSQL 数据库SQL Database 中用于优化事务处理、数据引入、数据加载和瞬态数据方案性能的数据库技术。In-memory OLTP is a database technology available in SQL ServerSQL Server and SQL 数据库SQL Database for optimizing performance of transaction processing, data ingestion, data load, and transient data scenarios.

为 Linux 配置永久内存支持Configuring persistent memory support for Linux

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) - Linux适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) - Linux

SQL Server 2019 (15.x)SQL Server 2019 (15.x) 介绍了如何使用 ndctl 实用工具永久内存配置永久内存 (PMEM)。describes how to configure persistent memory (PMEM) using the ndctl utility persistent memory.

永久日志缓冲区Persisted log Buffer

SQL Server 2016 (13.x)SQL Server 2016 (13.x) Service Pack 1 引入了针对 WRITELOG 等待所约束的写入密集型工作负载的性能优化。Service Pack 1 of SQL Server 2016 (13.x)SQL Server 2016 (13.x) introduced a performance optimization for write intensive workloads that were bound by WRITELOG waits. 永久内存用于存储日志缓冲区。Persistent memory is used to store the log buffer. 该缓冲区很小(每个用户数据库 20 MB),必须刷新到磁盘上才能使写入事务日志的事务得到强化。This buffer, which is small (20 MB per user database), has to be flushed to disk in order for the transactions written to the transaction log to be hardened. 对于写入密集型 OLTP 工作负载,此刷新机制可能会成为瓶颈。For write intensive OLTP workloads, this flushing mechanism can become a bottleneck. 在永久内存中使用日志缓冲区,减少了强化日志所需的操作数量,从而缩短了总事务时间并提高了工作负载性能。With the log buffer on persistent memory, the number of operations required to harden the log is reduced, improving overall transaction times and increasing workload performance. 此过程称为日志结尾缓存This process was introduced as Tail of Log Caching. 但是,与结尾日志备份存在明显的冲突,并且传统的理解是日志结尾是已强化但尚未备份的事务日志的一部分。However, there was a perceived conflict with Tail Log Backups and the traditional understanding that the tail of the log was the portion of the transaction log hardened but not yet backed up. 由于官方功能名称是永久日志缓冲区,因此,在此处使用该名称。Since the official feature name is Persisted Log Buffer, this is the name used here.

请参阅向数据库添加永久日志缓冲区See Add persisted log buffer to a database.