Skip to main content

One post tagged with "database schema design"

View All Tags

OLTP vs OLAP: Schema Design, CDC, DuckDB, and the Decision Framework

It was a Tuesday afternoon when the CTO sent the Slack message that every data engineer dreads:

"The claims dashboard has been loading for 47 seconds. Our customers are complaining. What happened?"

What happened was straightforward. A data analyst ran a reasonable aggregation — GROUP BY claim_type, EXTRACT(year FROM incident_date) — against production PostgreSQL: the same cluster that was already handling ~3,200 concurrent insurance claims from adjusters across eight states.

The query locked an index, response times spiked, and on-call was paged at 2 AM.

What failed wasn't the schema or the SQL. It was the assumption: that a system tuned for thousands of short, correct transactions per minute could also scan years of history for analytics without hurting live operations.

That is the OLTP vs OLAP problem in one outage. It is not abstract — it costs engineering hours, customer trust, and real infrastructure budget — and it usually begins with a schema decision from before analytics was on the roadmap.