Consider this:Your initial Transaction Log size is 1GBYou are rebuilding a Clustered Index (it is about 16GB in size) andit is the only transaction in the database:alter index [PK_Project_members] on jm_tl_t01.dbo.project_members rebuildwith (online=on,PAD_INDEX = ON, STATISTICS_NORECOMPUTE = ON, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 99)While the index is being rebuild you constantly poll "sys.dm_tran_session_transactions" and you see "database_transaction_log_bytes_used"=136 and "database_transaction_log_bytes_reserved"=9170.These values never change till the index rebuild is done.Note that this index rebuild causes the transaction log to grow over 40GB.The question is why "sys.dm_tran_session_transactions" does not correctly report bytes used by index rebuild. Note that on the other hand the transaction log space used by "Create Index" operation is reported by "sys.dm_tran_session_transactions" correctly.Any insight on this phenomena is appreciated.
↧