mardi 4 août 2015

UPDATE column for a large table with a single value

I have a table with 2 billion rows. The recovery mode is simple.

I have a simple task to do:

UPDATE myTable SET columnA = 'X'

The task seems easy at first, but everywhere I read that it is better to make a SELECT INTO another table, or do a batch update.

Is a batch update neccesary ? Will the query above blow up the transaction log ?

If I create another table I will for sure run out of space.

Any help would be appreciated.

EDIT: I do not have a primary key. Also, no indexes, no constraints, anything.

Aucun commentaire:

Enregistrer un commentaire