I have removed to NVARCHAR(MAX) columns from a table and what to calculated how exactly the table size was reduced.
Usually, I am rebuilding the clustered indexes but the table has more then 1.6 millions rows, more then 20 indexes and 80 columns. So, I want to use DBCC CLEANTABLE because:
... DBCC CLEANTABLE after you make significant changes to variable-length columns in a table or indexed view and you need to immediately reclaim the unused space. Alternatively, you can rebuild the indexes on the table or view; however, doing so is a more resource-intensive operation.
Using DBCC CLEANTABLE your are allowed to set a batch size:
The number of rows processed per transaction. If not specified, or if 0 is specified, the statement processes the whole table in one transaction.
As I have read processing the whole table may caused the transaction log file to grow. This is not a major issue as can shrink it, but the table is going to be locked during the command execution.
I am wandering if I use the batch size, could be table use during the command execution as well and what is the appropriate value for DBCC CLEANTABLE batch size?
The production database is operating under full recovery model and transaction log backup is made every 15 minutes.
Aucun commentaire:
Enregistrer un commentaire