4 ms·
Fair warning about this: if your transaction isolation level in your database is set to serialized hanging out in mid transaction while you verify your changes
by SOLAR_FIELDS 7y ago
Fair warning about this: if your transaction isolation level in your database is set to serialized hanging out in mid transaction while you verify your changes will block other calls to the table(s)!
I always recommend that you are wrapping calls in transactions if you are touching prod data. I only left the WHERE clause of my update query off once in my life before I started doing that.
- megous 7y agoIf you fear this, you can put it into script like this: BEGIN; UPDATE... SELECT for verification ROLLBACK; And then just change ROLLBACK to COMMIT, after you're sattisfied. There's no need to do it interactively.