Relational DB Isolation Visualizer

Debug transaction behavior, one line at a time.

Step backward and step over just like a debugger while watching both terminals and shared state mutate.
DefinitionRepeatable Read guarantees stable values for rows already read in the transaction. It prevents dirty reads and non-repeatable reads, but phantom reads can still occur when re-running range queries.
Shared DB stateAuto running
Account Balance$500
Orders > $1002
Left / Right / SpaceSpeed
Step 1/9

Transaction Flow Diagram

Swimlane view of the exact interleaving order.
Tx ATx B1START TRANSACTION;Transaction A starts.2SET TRANSACTION ISOLATION LEVE...A chooses Repeatable Read for this transaction.3SELECT COUNT(*) FROM orders WH...A sees 2 qualifying orders and expects that result to stay stable.4START TRANSACTION;Transaction B starts concurrently.5SET TRANSACTION ISOLATION LEVE...B uses the same isolation level.6INSERT INTO orders(amount) VAL...B inserts a new qualifying row.7COMMIT;B commits. The global table now has one extra row.8SELECT COUNT(*) FROM orders WH...A gets a phantom read because the matching row set changed.9COMMIT;A ends. Row values were stable, but the result set changed.
Terminal A
01
START TRANSACTION;Transaction A starts.
Terminal B
Waiting for this transaction to execute...