Subject Does added column cause all records to be touched or what happens?
Author Kjell Rilbe

I'm a bit curious. I just added a nullable bigint column without a
default value and an index on it to a table with about 150 million records.

It's taking very long to commit, so I'm wondering what the server is
actually doing. There's no criticism here, it's just something I find

Does it have to update all records to add a null value to the new column
or if not, how is it handled instead?

I assume the new index is built completely. If not, how is the index
handled instead?

Anything else going on in there? :-)

Kjell Rilbe
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64