2 ms·
Yes, but generally that could be handled in a multi-stage process. First you would create the new column with no constraint, then periodically start updating th
by bostonvaulter2 5y ago
Yes, but generally that could be handled in a multi-stage process. First you would create the new column with no constraint, then periodically start updating the rows, once nearly all the rows are updated with the new default, in a transaction you update the rest of the rows, update the table with the constraint, and set the default. Not very much downtime is required with this approach (although of course it is more involved).