You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/relational-databases/indexes/columnstore-indexes-data-loading-guidance.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,12 +26,12 @@ Options and recommendations for loading data into a columnstore index by using t
26
26
27
27
To perform a bulk load, you can use [bcp Utility](../../tools/bcp-utility.md), [Integration Services](../../integration-services/sql-server-integration-services.md), or select rows from a staging table.
28
28
29
-

29
+

30
30
31
31
As the diagram suggests, a bulk load:
32
32
33
33
- Does not pre-sort the data. Data is inserted into rowgroups in the order it is received.
34
-
- If the batch size is >= 102400, the rows are directly into the compressed rowgroups. It is recommended that you choose a batch size >=102400 for efficient bulk import because you can avoid moving data rows to a delta rowgroups before the rows are eventually moved to compressed rowgroups by a background thread, Tuple mover (TM).
34
+
- If the batch size is >= 102400, the rows are directly into the compressed rowgroups. It is recommended that you choose a batch size >=102400 for efficient bulk import because you can avoid moving data rows to delta rowgroups before the rows are eventually moved to compressed rowgroups by a background thread, Tuple mover (TM).
35
35
- If the batch size < 102,400 or if the remaining rows are < 102,400, the rows are loaded into delta rowgroups.
36
36
37
37
> [!NOTE]
@@ -92,9 +92,9 @@ SELECT col1 /* include actual list of columns in place of col1*/
92
92
FROM [<Staging Table>]
93
93
```
94
94
95
-
There are following optimizations available when loading into clustered columnstore index from staging table:
96
-
-**Log Optimization:** Reduced logging when the data is loaded into compressed rowgroup.
97
-
-**Locking Optimization:** When loading into compressed rowgroup, the X lock on rowgroup is acquired. However, with delta rowgroup, an X lock is acquired at rowgroup but [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] still locks the locks PAGE/EXTENT because X rowgroup lock is not part of locking hierarchy.
95
+
There are following optimizations available when loading into a clustered columnstore index from staging table:
96
+
-**Log Optimization:** Reduced logging when the data is loaded into a compressed rowgroup.
97
+
-**Locking Optimization:** When loading into a compressed rowgroup, the X lock on rowgroup is acquired. However, with delta rowgroup, an X lock is acquired at rowgroup but [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] still locks the locks PAGE/EXTENT because X rowgroup lock is not part of locking hierarchy.
98
98
99
99
If you have one or more nonclustered indexes, there is no locking or logging optimization for the index itself, but the optimizations on the clustered columnstore index as described above are still there.
100
100
@@ -115,7 +115,7 @@ INSERT INTO [<table-name>] VALUES ('some value' /*replace with actual set of val
115
115
ALTERINDEX [<index-name>] on [<table-name>] REORGANIZE
116
116
```
117
117
118
-
If you want force a delta rowgroup closed and compressed, you can execute the following command. You may want run this command if you are done loading the rows and don't expect any new rows. By explicitly closing and compressing the delta rowgroup, you can save storage further and improve the analytics query performance. A best practice is to invoke this command if you don't expect new rows to be inserted.
118
+
If you want to force a delta rowgroup closed and compressed, you can execute the following command. You may want run this command if you are done loading the rows and don't expect any new rows. By explicitly closing and compressing the delta rowgroup, you can save storage further and improve the analytics query performance. A best practice is to invoke this command if you don't expect new rows to be inserted.
119
119
120
120
```sql
121
121
ALTERINDEX [<index-name>] on [<table-name>] REORGANIZE with (COMPRESS_ALL_ROW_GROUPS =ON)
0 commit comments