Hacker News new | past | comments | ask | show | jobs | submit login

Transactions and rollback is the dry run. The problem is that if you keep the transaction open for too long, you will block other updates to the same data.



Yep, I always write any update queries as a rollback transaction with some selects inside it to verify what the data looks like after it's done now, before I switch it to commit. I primarily use Microsoft SQL Server right now, so I also use WITH (NOLOCK) to prevent issues running my query will have with other updates.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: