CoreTrail

Transactions

Understand concurrent work, isolation, and locks.

Chapter overview 2 min read
On this page

What can the other session see?

Correct SQL can still behave unexpectedly when two sessions act together. Transactions define atomic work; isolation controls what concurrent work can observe. Locks and waits explain operational behavior beyond a single query plan.

Decision reference

Symptom or requirement Investigate
Partial multi-step change Transaction boundaries and rollback
Different results across reads Isolation and snapshots
Two writers conflict Locks, constraints, retry rules
Query waits despite a simple plan Blocking sessions
Circular waiting Deadlock detection and transaction order

In this chapter

Rehearse it as two sessions

Write the order of operations for session A and session B. Mark what each session can see, where it waits, and what happens on retry. Concurrency problems are easier to explain as a timeline than as isolation-level definitions.

Type a concept, keyword, or function.