OLTP vs OLAP: Why Your App Database Isn't Built for Analytics
Introduction
Most engineers start their journey with PostgreSQL or a similar relational database. These systems handle everyday tasks exceptionally well: storing users, orders, and settings. But when the business starts asking questions - "How many orders did we have last quarter?", "Which products are bought together?" - performance problems emerge.
The issue isn't that PostgreSQL is bad. It was designed for atomic transaction processing (Online Transaction Processing), while analytics is a different type of workload (Online Analytical Processing). In this article, I'll explore the precise differences between these two task types and why analytics requires specialized systems like ClickHouse.
What is OLTP - Databases for Applications
When a customer places an order in an online store, the application must perform several actions simultaneously: record the order, decrease the quantity of goods in inventory, and create a payment record. All these actions must happen together -either everything or nothing. If payment...
Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE