Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

UPDATE on single column on a heap with 1.2B rows

$
0
0

Hi,

I have a table with 1.2Billion rows of data.  It's currently a heap and around 300GB in size (un-partitioned).

I'm trying to do a blanket UPDATE on the entire table on one of the columns by using a statement like:

UPDATE table SET column1 = column1 + '-' + CAST(column2 as varchar(10))

Column1 is varchar and column2 is int so I need to cast column2 to varchar to allow concatenation.

I run the update but the translog has grown to 200GB and it still growing, the tempdb is now around 100GB.  The query is still running, is not blocked etc.

I thought that because the UPDATE did not have a WHERE clause then the table being a heap may not matter, is this the case?

Can anyone point me in the right direction of some help with this UPDATE please?

Thanks


Viewing all articles
Browse latest Browse all 15889

Trending Articles



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