SQLite 3.53 adds SET NOT NULL without a full table rebuild
SQLite 3.53.0, released in April 2026, introduces ALTER TABLE ... ALTER COLUMN ... SET NOT NULL and DROP NOT NULL. On a 2-million-row table the change took about 0.01s versus 1.5–1.8s for a full rebuild — roughly 150–180x faster.
- SET NOT NULL issues 6 disk writes versus 69,843 for a table rebuild
- On a 2M-row table: ~0.01s versus 1.5–1.8s for the old approach
- With an index the null check reads 13 pages; without one, 25,372 reads on 8M rows
- Undocumented ADD CONSTRAINT and DROP CONSTRAINT also work but appear nowhere in the docs
Read next
Gaming