I am trying to update a couple of columns in my SQLite database using:
UPDATE db SET Col1 = 0 WHERE Col1 IS NULL;
UPDATE db SET Col2 = 0 WHERE Col2 IS NULL;
However this seems to take a very long time to even update one column. I have resorted to using:
CASE WHEN Col1 IS NULL THEN 0 ELSE Col1 END
in my SELECT queries which works a lot quicker, however is there a reason why the UPDATE method is so slow? (I only have 670K rows in my database)
NOTE: My computer is fairly high-end and when the UPDATE is running, there doesn't seem to be much pressure on my desktops resources.