OLTP: frequent small transactions and strong integrity
standardintermediateOLTP stands for online transaction processing, and it describes the workload your application generates: a high rate of small, short transactions, each touching a few rows, each expected to complete in milliseconds. A checkout, a login, a comment, a status change. Two things characterise it beyond size. First, the operations are transactional — several writes must succeed or fail together, and the database is expected to guarantee that even under concurrency and crashes. Second, integrity is enforced rather than assumed: foreign keys, unique constraints, check constraints and isolation levels exist so that invalid states cannot be stored, no matter which code path attempts it. Those guarantees are why an OLTP store is designed the way it is — row-oriented layout so a whole record is one read, B-tree indexes so a lookup by key is a seek rather than a scan, careful concurrency control so thousands of small transactions interleave safely, and durable write-ahead logging so a committed transaction survives a crash. Every one of those choices favours precision and latency over throughput on large scans, which is exactly the right trade for the workload and exactly the wrong one for analytics.
Think of it as
A bank counter. Each interaction is small, specific and must be exactly right: the money either moved or it did not, and there is no acceptable middle state. Speed matters, but correctness under concurrent activity matters more, and the whole design of the counter — the ledger, the double-signing, the receipt — exists to make a wrong outcome structurally difficult rather than merely unlikely.
- Small and fast — a few rows, milliseconds
- Atomic — several writes, all or nothing
- Constrained — invalid states cannot be stored
- Isolated — safe under concurrency
- Durable — a commit survives a crash
What an OLTP store is optimised for
Remember: OLTP is a high rate of small, short, transactional operations with integrity enforced by the database rather than by the application. Row storage, B-tree indexes, isolation control and write-ahead logging all exist to serve that: per-operation correctness and low latency, guaranteed under concurrency and crashes. The same choices make large column-selective scans expensive, which is the trade the workload is meant to make.
See also: olap workload characteristics · keeping reporting off the transactional database · isolation levels · choosing enforcement mechanisms · choosing a data model

