Skip to content
PHP2Shell: The PHP Bug
Akshay Thakare

OLTP vs OLAP: Why Analytics Needs a Different Database

Row stores vs column stores, normalized vs dimensional schemas, and why you do not run dashboards on the production database.

Data WarehousingBeginner2 min readUpdated 11 Oct 2026

Two workloads

OLTP (operational)OLAP (analytical)
ExampleCheckout, bank transferMonthly revenue by region
Query shapeRead or write a few rows by keyScan millions of rows, few columns
ConcurrencyThousands of tiny transactionsFewer, heavy queries
SchemaNormalized (3NF)Dimensional (star schema)
StorageRow-orientedColumn-oriented
ExamplesPostgreSQL, MySQL, DynamoDBSnowflake, BigQuery, Redshift, Databricks SQL

Why column storage wins for analytics

SQL.sql
SELECT region, SUM(net_sales) FROM sales GROUP BY region;

A row store reads every column of every row. A column store reads only region and net_sales, and similar values in a column compress very well.

Why not query production directly?

  • Heavy scans slow down customer-facing transactions.
  • Operational schemas are normalized for writes, so analytical questions need many joins.
  • History is often overwritten, so "what was true last month" is lost.

So data is copied (ETL/ELT) from OLTP sources into a warehouse modeled for analysis.

Finished this note?

Share