Database Reference
In-Depth Information
Neither tuple mover nor index reorganizing prevent other sessions from inserting new data into a table. New data
will be inserted into different and open delta stores. However, deletions and data modifications would be blocked
for the duration of the operation. In some cases, you may consider forcing index reorganization manually to reduce
execution and, therefore, locking time.
You can examine the state of row groups and delta stores with the sys.column_store_row_groups view.
Figure 35-2 illustrates the output of this view, which returns the combined information of all columnstore index
objects. Rows in OPEN or CLOSED state correspond to delta stores. Rows in COMPRESSED state correspond to row
groups with data in a column-based storage format. Finally, the deleted_rows column provides statistics about
deleted rows stored in a delete bitmap.
Figure 35-2. sys.column_store_row_groups view output
As you can see, the second row in a view output from Figure 35-2 shows the closed delta store that has yet to be
picked up by the tuple mover process. The situation will change after the tuple mover process converts the closed
delta store to a row group on its next scheduled run. Figure 35-3 shows the output from a view after this occurs. It
is worth noting that the row_group_id of the converted row group changed. Tuple mover created a new row group,
dropping the closed delta store afterwards.
Figure 35-3. sys.column_store_row_groups view output after tuple mover process execution
Data Load
Two different types of data load can insert data into a columnstore index. The first type is bulk insert , which is used by
the BULK INSERT operator, bcp utility, and other applications that utilize the bulk insert API. The second type, called
trickle inserts, are regular INSERT operations that do not use the bulk insert API.
Bulk insert operations provide the number of rows in the batch as part of the API call. SQL Server inserts data into
newly created row groups if that size exceeds a threshold of about 100,000 rows. Depending on the size of the batch,
one or more row groups can be created and some rows may be stored in delta store.
Table 35-1 illustrates how data from the different batches are distributed between row groups and delta stores.
 
Search WWH ::




Custom Search