Skip to content

Fragmentation

NikoNeugebauer edited this page Aug 30, 2015 · 2 revisions

You can use fragmentation.sql script or as an alternative a stored procedure cstore_GetFragmentation for getting the different types of Columnstore Indexes Fragmentation.

More precisely, this script provides detailed information on the number of completely deleted Row Groups and their percentage to the whole Columnstore structure, plus the information on the trimmed Row Groups and the number of Row Groups that can be potentially optimised by rebuilding Columnstore Index in question.

Known Issues & Limitations:

	- Tables with just 1 Row Group are shown that they can be improved. This will be corrected in the future version.

Parameters:

@tableName nvarchar(256) = NULL
Allows to show data filtered down to 1 particular table

@columnName nvarchar(256) = NULL Allows to show data filtered down to 1 particular column name.

@showPartitionStats bit = 1 Shows alignment statistics based on the partition. Setting this option to 0 will make the script treating all partitions inside a table as if it would have just 1. This makes sense if you want to have a big view across all partitions.


Examples: