Search code examples
sql-serverindexingfragmentationdefragmentation

(SQL Server) How to defragment indexes with LOBs?


In SQL Server, are there some points on defragmenting indexes with LOBs? Such as text, ntext, image, varchar(max), nvarchar(max), varbinary(max), xml.

Thanks.


Solution

    • You can't do online index rebuilds
    • You have the option LOB_COMPACTION. It does exactly that if ON

    Otherwise, nothing special

    I'd consider doing a LOB_COMPACTION less frequently but both options comes down to your maintenance windows duration pretty much