3 ms·
This optimization applies only for new columns with a stable default. Therefore a table scan is not required to check for NULLs, as either the default is NULL o
by anarazel 8y ago
This optimization applies only for new columns with a stable default. Therefore a table scan is not required to check for NULLs, as either the default is NULL or not.
- gcbirzan 8y agoI was talking about the way to do it before. You could create a NULL-able column, add the default in batches, add the default/make it non-NULL-able. But, the last part took some time (not in the range of ms) for large tables.
- pilif 8y ago> But, the last part took some time (not in the range of ms) for large tables create a temporary index covering that column. Then it will be in the range of ms.