Re:Feature Casualties of Large Databases
by yc12340 on Tuesday December 01, 2020 @11:18PM
(#25273199)
> First you add a not null check NOT VALIDATED - Then you add a not null constraint (it will require a full table scan, but with minimal locking) - Afterwards you can remove the unnecessary not null check
This is still quite long and complicated. What stops Postgres from automatically tracking whether a column has any nulls on each insert?
This is still quite long and complicated. What stops Postgres from automatically tracking whether a column has any nulls on each insert?