Basic Transactions: Performance
Module: SQL Fundamentals
**Performance Tips:**
- Keep transactions short (hold locks briefly)
- Don't include user input waits in transactions
- Commit frequently in batch operations
- Avoid long-running transactions (blocks other users)
- Use appropriate isolation levels
Short transactions reduce lock contention
Avoid user input waits inside transactions
Batch operations: Commit every N rows
Long transactions block other users
Forgetting to COMMIT (changes lost)
Long transactions (blocks other users)
Not using transactions for related changes
Including user waits in transactions
Not handling errors with ROLLBACK