why the online rebuild on a primary key clustered index in taking almost equal to the space of non clustered index size which is untouched.
Details:
- We have a table with primary key clustered index (bigint type) of index size 7GB.
- We have another non-clustered filtered index on same table (varchar(36) type) of index size nearly 1.5TB.
- Online rebuild on primary key clustered index is consuming almost 1.6TB of transaction log size. Options used for rebuild - (DATA_COMPRESSION = PAGE, ONLINE = ON, SORT_IN_TEMPDB = ON)
- Another observation, the previous index was created without compression, not sure if that is what causing such a huge growth.
- Could someone please shed some internals about it?