DBRaven
OLTP vs OLAP

OLTP vs OLAP

Intermediate

How OLTP and OLAP workloads have fundamentally different access patterns, why row-oriented and column-oriented storage are each optimal for one, how mixing them on the same system causes interference, and how hybrid architectures separate the concerns.

Step 1 of 5

OLTP Access Pattern: Many Small Reads

OLTP workloads (application databases) issue many small, point-lookup queries: fetch one user, update one order, check one inventory record. Row-oriented storage keeps all columns for a row together on disk : ideal for fetching complete records. PostgreSQL retrieves an 8KB page containing the target row and a few neighbors. Most columns in the row are needed.

Queries per Second12,000 qps
Rows per Query1 rows
Columns Accessed8 of 8
Query Latency2 ms

OLTP pattern: 12,000 qps, 1 row per query, all columns, 2ms latency

Key Takeaways

  • OLTP queries are narrow in rows (1–100) but wide in columns (all fields of a record)
  • Row-oriented storage is optimal for OLTP: a single page read retrieves the full record
1 / 5