Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 5123

Transaction log growth based on update or delete count.

$
0
0

Ok, Can someone please explain this in a detail so every sql developer/dba will never have to guess :)

Lets say I am updating  10% of a table's data in a transaction. It is a situation which needs a data fix. I am trying to find how much transaction log will be generated? If the log size is 1 GB how much it will grow ? To be more precise, I am changing the value to '' (empty space) if it is null. (I know this is bad, the app development always wants data fix, instead of writing good code). 

Begin tran

update MyTable set MyColumn = '' where Mycolumn is null --Lets says this updates 10% of the data in the table.

Commit tran

case 1: Update a table with 1 million rows

case2 : Update a table with 10 million rows

case 3: Update a table with 100 million rows


Ranga


Viewing all articles
Browse latest Browse all 5123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>