CockroachDB Internals ] Let's talk about OLTP and OLAP databases

Arpit Bhayani

Arpit Bhayani

Apr 06, 2023 • 1 min read


[CockroachDB Internals #1] Let’s talk about OLTP and OLAP databases and understand where they differ … ⚡

OLTP databases are designed to handle Transactional workloads. The word transactions do not mean ACID properties, instead, it denotes a specific type of data access pattern

  • reads and writes on a small amount of data/rows/records
  • the database will be queried concurrently by many clients
  • read and write operation cannot run for long

On the other hand, OLAP databases handle the Analytical workloads that serve the following data access pattern

  • reads involve accessing large number of data/rows/records
  • writes can be granular or batch, but are mostly done in bulk
  • bandwidth is more important than latency, which means read operations can run for long

Hope this clears up the difference between OLTP and OLAP. Some examples of OLTP are MySQL, Postgres, Redis, etc. While BigQuery and Redshift are OLAP databases.

Recently, I started diving deep into CockroachDB internals, and I will be sharing my learning in public. So, if you find it amusing, follow along.

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses