Difficulty: Advanced
Optimistic vs. Pessimistic locking?
**Optimistic**: Assume no conflict, check version at commit. Better for low contention. **Pessimistic**: Lock the row immediately. Better for high contention.
Locking, Versioning, Conflicts
JavaScript is required for the interactive version of this page, including the code playground and progress tracking. Browse all InternHack tutorials.