DROP COLUMN only makes the column invisible to SQL operations by setting attisdropped=True in the system catalog table pg_attribute. Existing rows keep the original value, while new rows will store NULL on that column.
Thus, dropping a column is quick, but it doesn't reduce the disk size of your table. That space will be reclaimed over time as existing rows are updated. However, if you want to reclaim disk space immediatelly, you can execute VACUUM FULL to force a rewrite of the table.
See more info on StackOverflow.
2
14 reads
IDEAS CURATED BY
Alt account of @ocp. I use it to stash ideas about software engineering
Learn more about computerscience with this collection
Understanding machine learning models
Improving data analysis and decision-making
How Google uses logic in machine learning
Related collections
Similar ideas
7 ideas
Database indexes
en.wikipedia.org
1 idea
Foreign Key on Models | Django documentation
docs.djangoproject.com
2 ideas
PostgreSQL - How to Configure Slow Query Log
postgresql.org
Read & Learn
20x Faster
without
deepstash
with
deepstash
with
deepstash
Personalized microlearning
—
100+ Learning Journeys
—
Access to 200,000+ ideas
—
Access to the mobile app
—
Unlimited idea saving
—
—
Unlimited history
—
—
Unlimited listening to ideas
—
—
Downloading & offline access
—
—
Supercharge your mind with one idea per day
Enter your email and spend 1 minute every day to learn something new.
I agree to receive email updates