Skip to main content
added 2 characters in body
Source Link
Aleksey Vitsko
  • 6k
  • 5
  • 37
  • 68

Is there a way to apply a data compression to this table without dropping the primary key?

Yes you just need to run below command to rebuild the clustered index (in your case it is also PK):

ALTER INDEX [PK__t1__3BD0198E286DEFE4] on TABLE [t1] 
REBUILD with (ONLINE = ON, DATA_COMPRESSION = ONPAGE)

"ONLINE = ON" clause can help greatly reduce locking of table that is being rebuilt

Is there a way to apply a data compression to this table without dropping the primary key?

Yes you just need to run below command to rebuild the clustered index (in your case it is also PK):

ALTER INDEX [PK__t1__3BD0198E286DEFE4] on TABLE [t1] 
REBUILD with (ONLINE = ON, DATA_COMPRESSION = ON)

"ONLINE = ON" clause can help greatly reduce locking of table that is being rebuilt

Is there a way to apply a data compression to this table without dropping the primary key?

Yes you just need to run below command to rebuild the clustered index (in your case it is also PK):

ALTER INDEX [PK__t1__3BD0198E286DEFE4] on TABLE [t1] 
REBUILD with (ONLINE = ON, DATA_COMPRESSION = PAGE)

"ONLINE = ON" clause can help greatly reduce locking of table that is being rebuilt

deleted 91 characters in body
Source Link
Aleksey Vitsko
  • 6k
  • 5
  • 37
  • 68

Is there a way to apply a data compression to this table without dropping the primary key?

Yes you just need to run below command to rebuild the clustered index (in your case it is also PK):

ALTER INDEX [PK__t1__3BD0198E286DEFE4] on TABLE [t1] 
REBUILD with (ONLINE = ON, DATA_COMPRESSION = ON)

"ONLINE = ON" clause can be used if your SQL Server's Edition is Enterprise (or Developer or Evaluation...) and can help greatly reduce locking of table that is being rebuilt

Is there a way to apply a data compression to this table without dropping the primary key?

Yes you just need to run below command to rebuild the clustered index (in your case it is also PK):

ALTER INDEX [PK__t1__3BD0198E286DEFE4] on TABLE [t1] 
REBUILD with (ONLINE = ON, DATA_COMPRESSION = ON)

"ONLINE = ON" clause can be used if your SQL Server's Edition is Enterprise (or Developer or Evaluation...) and can help greatly reduce locking of table that is being rebuilt

Is there a way to apply a data compression to this table without dropping the primary key?

Yes you just need to run below command to rebuild the clustered index (in your case it is also PK):

ALTER INDEX [PK__t1__3BD0198E286DEFE4] on TABLE [t1] 
REBUILD with (ONLINE = ON, DATA_COMPRESSION = ON)

"ONLINE = ON" clause can help greatly reduce locking of table that is being rebuilt

Source Link
Aleksey Vitsko
  • 6k
  • 5
  • 37
  • 68

Is there a way to apply a data compression to this table without dropping the primary key?

Yes you just need to run below command to rebuild the clustered index (in your case it is also PK):

ALTER INDEX [PK__t1__3BD0198E286DEFE4] on TABLE [t1] 
REBUILD with (ONLINE = ON, DATA_COMPRESSION = ON)

"ONLINE = ON" clause can be used if your SQL Server's Edition is Enterprise (or Developer or Evaluation...) and can help greatly reduce locking of table that is being rebuilt