OLTP

OLTP (Online Transaction Processing) describes the class of database workloads characterised by many short-lived, latency-sensitive transactions: row-level reads and writes that back interactive applications. OLTP contrasts with OLAP (Online Analytical Processing), where queries scan large fractions of historical data for analytics.

OLTP characteristics

  • Short transactions. A few row reads and writes; complete in milliseconds.
  • High concurrency. Thousands to hundreds of thousands of transactions per second.
  • Row-oriented storage. Optimised for fetching whole rows quickly.
  • ACID guarantees. Atomicity and isolation matter for business correctness.
  • Strict latency SLAs. User-facing requests demand p99 latency targets.

OLTP vs OLAP

OLTPOLAP
WorkloadMany small reads/writesFew large scans and aggregations
StorageRow-orientedColumn-oriented
LatencyMillisecondsSeconds to minutes
ExamplesPostgreSQL, MySQL, DynamoDBBigQuery, Snowflake, Redshift, ClickHouse, DuckDB

Modern HTAP (Hybrid Transactional/Analytical Processing) systems like TiDB and SingleStore aim to serve both workloads from one engine.

🔗
Related Terms
PostgreSQL, MySQL, MongoDB, ACID, MVCC, SQL.

Subscribe to Sahil's Playbook

Clear thinking on product, engineering, and building at scale. No noise. One email when there's something worth sharing.
[email protected]
Subscribe
Mastodon