Skip to content

Commit 34412e6

Browse files
authored
Merge pull request #23613 from rwestMSFT/rw-0808-includes-in-memory-oltp
[Bulk] INCLUDE file maintenance: in-memory OLTP
2 parents 48c60c1 + bc4ef8c commit 34412e6

35 files changed

Lines changed: 105 additions & 105 deletions

File tree

docs/includes/hek-1-md.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

docs/relational-databases/backup-restore/piecemeal-restores-sql-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ms.author: mathoma
4848

4949
Online piecemeal restores can involve deferred transactions. When only a subset of filegroups has been restored, transactions in the database that depend on online filegroups might become deferred. This is typical, because the whole database must be consistent. For more information, see [Deferred Transactions (SQL Server)](../../relational-databases/backup-restore/deferred-transactions-sql-server.md).
5050

51-
- [!INCLUDE[hek_1](../../includes/hek-1-md.md)] piecemeal restore scenario
51+
- [!INCLUDE[inmemory-md](../../includes/inmemory-md.md)] piecemeal restore scenario
5252

5353
For information on Piecemeal Restores of In-Memory OLTP databases see [Piecemeal Backup and Restore of Databases With Memory-Optimized Tables](../../relational-databases/in-memory-oltp/piecemeal-restore-of-databases-with-memory-optimized-tables.md).
5454

docs/relational-databases/in-memory-oltp/accessing-memory-optimized-tables-using-interpreted-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ However, the following [!INCLUDE[tsql](../../includes/tsql-md.md)] constructs ar
4141

4242
## Table Hints
4343

44-
For more information about table hints, see. [Table Hints (Transact-SQL)](../../t-sql/queries/hints-transact-sql-table.md). The SNAPSHOT was added to support [!INCLUDE[hek_2](../../includes/hek-2-md.md)].
44+
For more information about table hints, see. [Table Hints (Transact-SQL)](../../t-sql/queries/hints-transact-sql-table.md). The SNAPSHOT was added to support [!INCLUDE[inmemory](../../includes/inmemory-md.md)].
4545

4646
The following table hints are not supported when accessing a memory-optimized table using interpreted [!INCLUDE[tsql](../../includes/tsql-md.md)].
4747

docs/relational-databases/in-memory-oltp/application-pattern-for-partitioning-memory-optimized-tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||
1717

1818
[!INCLUDE [SQL Server Azure SQL Database Azure SQL Managed Instance](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
1919

20-
[!INCLUDE[hek_2](../../includes/hek-2-md.md)] supports an application design pattern that lavishes performance resources on relatively current data. This pattern can apply when current data is read or updated far more frequently than older data is. In this case, we say the current data is *active* or *hot*, and the older data is *cold*.
20+
[!INCLUDE[inmemory](../../includes/inmemory-md.md)] supports an application design pattern that lavishes performance resources on relatively current data. This pattern can apply when current data is read or updated far more frequently than older data is. In this case, we say the current data is *active* or *hot*, and the older data is *cold*.
2121

2222
The main idea is to store *hot* data in a memory-optimized table. On a weekly or monthly basis, older data that has become *cold* is moved to a partitioned table. The partitioned table has its data stored on a disk or other hard drive, not in memory.
2323

docs/relational-databases/in-memory-oltp/bind-a-database-with-memory-optimized-tables-to-a-resource-pool.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ GO
157157
```
158158

159159
## <a name="bkmk_PercentAvailable"></a> Percent of memory available for memory-optimized tables and indexes
160-
If you map a database with memory-optimized tables and a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] workload to the same resource pool, the Resource Governor sets an internal threshold for [!INCLUDE[hek_2](../../includes/hek-2-md.md)] use so that the users of the pool do not have conflicts over pool usage. Generally speaking, the threshold for [!INCLUDE[hek_2](../../includes/hek-2-md.md)] use is about 80% of the pool. The following table shows actual thresholds for various memory sizes.
160+
If you map a database with memory-optimized tables and a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] workload to the same resource pool, the Resource Governor sets an internal threshold for [!INCLUDE[inmemory](../../includes/inmemory-md.md)] use so that the users of the pool do not have conflicts over pool usage. Generally speaking, the threshold for [!INCLUDE[inmemory](../../includes/inmemory-md.md)] use is about 80% of the pool. The following table shows actual thresholds for various memory sizes.
161161

162-
When you create a dedicated resource pool for the [!INCLUDE[hek_2](../../includes/hek-2-md.md)] database, you need to estimate how much physical memory you need for the in-memory tables after accounting for row versions and data growth. Once you estimate the memory needed, you create a resource pool with a percent of the commit target memory for SQL Instance as reflected by column 'committed_target_kb' in the DMV [`sys.dm_os_sys_info`](../../relational-databases/system-dynamic-management-views/sys-dm-os-sys-info-transact-sql.md). For example, you can create a resource pool P1 with 40% of the total memory available to the instance. Out of this 40%, the [!INCLUDE[hek_2](../../includes/hek-2-md.md)] engine gets a smaller percent to store [!INCLUDE[hek_2](../../includes/hek-2-md.md)] data. This is done to make sure [!INCLUDE[hek_2](../../includes/hek-2-md.md)] does not consume all the memory from this pool. This value of the smaller percent depends upon the Target committed Memory. The following table describes memory available to [!INCLUDE[hek_2](../../includes/hek-2-md.md)] database in a resource pool (named or default) before an OOM error is raised.
162+
When you create a dedicated resource pool for the [!INCLUDE[inmemory](../../includes/inmemory-md.md)] database, you need to estimate how much physical memory you need for the in-memory tables after accounting for row versions and data growth. Once you estimate the memory needed, you create a resource pool with a percent of the commit target memory for SQL Instance as reflected by column 'committed_target_kb' in the DMV [`sys.dm_os_sys_info`](../../relational-databases/system-dynamic-management-views/sys-dm-os-sys-info-transact-sql.md). For example, you can create a resource pool P1 with 40% of the total memory available to the instance. Out of this 40%, the [!INCLUDE[inmemory](../../includes/inmemory-md.md)] engine gets a smaller percent to store [!INCLUDE[inmemory](../../includes/inmemory-md.md)] data. This is done to make sure [!INCLUDE[inmemory](../../includes/inmemory-md.md)] does not consume all the memory from this pool. This value of the smaller percent depends upon the Target committed Memory. The following table describes memory available to [!INCLUDE[inmemory](../../includes/inmemory-md.md)] database in a resource pool (named or default) before an OOM error is raised.
163163

164164
|Target Committed Memory|Percent available for in-memory tables|
165165
|-----------------------------|---------------------------------------------|
@@ -169,7 +169,7 @@ GO
169169
|\<= 96 GB|85%|
170170
|>96 GB|90%|
171171

172-
For example, if your 'target committed memory' is 100 GB, and you estimate your memory-optimized tables and indexes need 60GB of memory, then you can create a resource pool with MAX_MEMORY_PERCENT = 67 (60GB needed / 0.90 = 66.667GB - round up to 67GB; 67GB / 100GB installed = 67%) to ensure that your [!INCLUDE[hek_2](../../includes/hek-2-md.md)] objects have the 60GB they need.
172+
For example, if your 'target committed memory' is 100 GB, and you estimate your memory-optimized tables and indexes need 60GB of memory, then you can create a resource pool with MAX_MEMORY_PERCENT = 67 (60GB needed / 0.90 = 66.667GB - round up to 67GB; 67GB / 100GB installed = 67%) to ensure that your [!INCLUDE[inmemory](../../includes/inmemory-md.md)] objects have the 60GB they need.
173173

174174
Once a database has been bound to a named resource pool, use the following query to see memory allocations across different resource pools.
175175

docs/relational-databases/in-memory-oltp/configuring-storage-for-memory-optimized-tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ After you determine the size, you must provide disk space sufficient to hold the
2323
A good starting point for sizing storage for this area is to reserve four times the size of durable, in-memory tables. Monitor the space usage and be prepared to expand the storage that's available to it if necessary.
2424

2525
## Storage IOPS
26-
[!INCLUDE[hek_2](../../includes/hek-2-md.md)] can significantly increase your workload throughput. Therefore, it is important to ensure that IO is not a bottleneck.
26+
[!INCLUDE[inmemory](../../includes/inmemory-md.md)] can significantly increase your workload throughput. Therefore, it is important to ensure that IO is not a bottleneck.
2727

2828
- When migrating disk-based tables to memory-optimized tables, make sure that the transaction log is on a storage media that can support increased transaction log activity. For example, if your storage media supports transaction log operations at 100 MB/sec, and memory-optimized tables result in five times greater performance, the transaction log's storage media must be able to also support five times performance improvement, to prevent the transaction log activity from becoming a performance bottleneck.
2929

docs/relational-databases/in-memory-oltp/creating-and-managing-storage-for-memory-optimized-objects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||
1515
# Creating and Managing Storage for Memory-Optimized Objects
1616
[!INCLUDE [SQL Server Azure SQL Database Azure SQL Managed Instance](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
1717

18-
The [!INCLUDE[hek_2](../../includes/hek-2-md.md)] engine is integrated into [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], which lets you have both memory-optimized tables and (traditional) disk-based tables in the same database. However, the storage structure for memory-optimized tables is different from disk-based tables.
18+
The [!INCLUDE[inmemory](../../includes/inmemory-md.md)] engine is integrated into [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], which lets you have both memory-optimized tables and (traditional) disk-based tables in the same database. However, the storage structure for memory-optimized tables is different from disk-based tables.
1919

2020
Storage for disk-based table has following key attributes:
2121

docs/relational-databases/in-memory-oltp/durability-for-memory-optimized-tables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ ms.assetid: d304c94d-3ab4-47b0-905d-3c8c2aba9db6
1313
# Durability for Memory-Optimized Tables
1414
[!INCLUDE [SQL Server](../../includes/applies-to-version/sqlserver.md)]
1515

16-
[!INCLUDE[hek_2](../../includes/hek-2-md.md)] provides full durability for memory-optimized tables. When a transaction that changed a memory-optimized table commits, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (as it does for disk-based tables), guarantees that the changes are permanent (will survive a database restart), provided the underlying storage is available. There are two key components of durability: transaction logging and persisting data changes to on-disk storage.
16+
[!INCLUDE[inmemory](../../includes/inmemory-md.md)] provides full durability for memory-optimized tables. When a transaction that changed a memory-optimized table commits, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] (as it does for disk-based tables), guarantees that the changes are permanent (will survive a database restart), provided the underlying storage is available. There are two key components of durability: transaction logging and persisting data changes to on-disk storage.
1717

1818
For details on any size limitations for durable tables see [Estimate Memory Requirements for Memory-Optimized Tables](../../relational-databases/in-memory-oltp/estimate-memory-requirements-for-memory-optimized-tables.md).
1919

2020
## Transaction Log
21-
All changes made to disk-based tables or durable memory-optimized tables are captured in one or more transaction log records. When a transaction commits, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] writes the log records associated with the transaction to disk before communicating to the application or user session that the transaction has committed. This guarantees that changes made by the transaction are durable. The transaction log for memory-optimized tables is fully integrated with the same log stream used by disk-based tables. This integration allows existing transaction log backup, recover, and restore operations to continue to work without requiring any additional steps. However, since [!INCLUDE[hek_2](../../includes/hek-2-md.md)] can increase transaction throughput of your workload significantly, log IO may become a performance bottleneck. To sustain this increased throughput, ensure the log IO subsystem can handle the increased load.
21+
All changes made to disk-based tables or durable memory-optimized tables are captured in one or more transaction log records. When a transaction commits, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] writes the log records associated with the transaction to disk before communicating to the application or user session that the transaction has committed. This guarantees that changes made by the transaction are durable. The transaction log for memory-optimized tables is fully integrated with the same log stream used by disk-based tables. This integration allows existing transaction log backup, recover, and restore operations to continue to work without requiring any additional steps. However, since [!INCLUDE[inmemory](../../includes/inmemory-md.md)] can increase transaction throughput of your workload significantly, log IO may become a performance bottleneck. To sustain this increased throughput, ensure the log IO subsystem can handle the increased load.
2222

2323
## Data and Delta Files
2424
The data in memory-optimized tables is stored as free-form data rows in an in-memory heap data structure, and are linked through one or more indexes in memory. There are no page structures for data rows, such as those used for disk-based tables. For long term persistence and to allow truncation of the transction log, operations on memory-optimized tables are persisted in a set of data and delta files. These files are generated based on the transaction log, using an asynchronous background process. The data and delta files are located in one or more containers (using the same mechanism used for FILESTREAM data). These containers are part of a memory-optimized filegroup.

docs/relational-databases/in-memory-oltp/estimate-memory-requirements-for-memory-optimized-tables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||
1717

1818
Memory-optimized tables require that sufficient memory exist to keep all of the rows and indexes in memory. Because memory is a finite resource, it's important that you understand and manage memory usage on your system. The topics in this section cover common memory use and management scenarios.
1919

20-
Whether you're creating a new memory-optimized table or migrating an existing disk-based table to an [!INCLUDE[hek_2](../../includes/hek-2-md.md)] memory-optimized table, it's important to have a reasonable estimate of each table's memory needs so you can provision the server with sufficient memory. This section describes how to estimate the amount of memory that you need to hold data for a memory-optimized table.
20+
Whether you're creating a new memory-optimized table or migrating an existing disk-based table to an [!INCLUDE[inmemory](../../includes/inmemory-md.md)] memory-optimized table, it's important to have a reasonable estimate of each table's memory needs so you can provision the server with sufficient memory. This section describes how to estimate the amount of memory that you need to hold data for a memory-optimized table.
2121

2222
If you're contemplating migrating from disk-based tables to memory-optimized tables, before you proceed in this topic, see the topic [Determining if a Table or Stored Procedure Should Be Ported to In-Memory OLTP](../../relational-databases/in-memory-oltp/determining-if-a-table-or-stored-procedure-should-be-ported-to-in-memory-oltp.md) for guidance on which tables are best to migrate. All the topics under [Migrating to In-Memory OLTP](./plan-your-adoption-of-in-memory-oltp-features-in-sql-server.md) provide guidance on migrating from disk-based to memory-optimized tables.
2323

@@ -125,7 +125,7 @@ SELECT COUNT(DISTINCT [Col2])
125125

126126
If you're creating a new table, you'll need to estimate the array size or gather data from your testing prior to deployment.
127127

128-
For information on how hash indexes work in [!INCLUDE[hek_2](../../includes/hek-2-md.md)] memory-optimized tables, see [Hash Indexes](/previous-versions/sql/sql-server-2016/dn133190(v=sql.130)).
128+
For information on how hash indexes work in [!INCLUDE[inmemory](../../includes/inmemory-md.md)] memory-optimized tables, see [Hash Indexes](/previous-versions/sql/sql-server-2016/dn133190(v=sql.130)).
129129

130130
#### Setting the hash index array size
131131

0 commit comments

Comments
 (0)