SQL Server 2022 Express (16.0.1000.6) on Windows Server 2016 Standard.
I have a table with two indexes.
- An ordered columnstore index (ordered by a smalldatetime column, and then an int column).
- A unique index to enforce a primary key (on the same two columns as the columnstore index).
The table also has two foreign key constraints that reference the columns in the columnstore index / unique index.
There is a batch job that trickle inserts approximately 3,000 rows each hour, over a period of two minutes, these records are inserted in the same order of the columnstore index. Each row is inserted in a single insert statement.
If no select queries are run during the trickle insert, then a single delta rowgroup is inserted into then eventually closed.
If select queries are run during the trickle insert, then many new open delta rowgroups are created, each with very few rows (1, 3, 3, 2, 2, 2, 3, 8, etc.). This can be seen by selecting from sys.dm_db_column_store_row_group_physical_stats.
I have been unable to determine the reason this is occurring, and have found no articles that describe similar behavior.
Would could be the cause of these large number of open delta rowgroups being created?
Thanks.