I have a table with 12 million rows. There are 16 columns on the table, one of which is a boolean.
After a certain business process, a large chunk of these rows will have this boolean set to false (80%). I want to update all of these values back to true.
Query would be simple enough:
UPDATE table SET my_boolean=TRUE
This query takes a very long time though on my development server (quad core, SSD, 8GB ram). The last time it took over 35 minutes.
I've already deleted all indices before executing the query as I've read that could be a major slowdowner.
I've already analyzed and vacuumed the table, doesn't seem to improve.
I'm quite new to Postgres and am kind of lost as to why this simple query is taking SO long. Any pointers would be greatly appreciated.