What is the difference between OLTP and OLAP, and between row stores and column stores?
What is the difference between OLTP and OLAP, and between row stores and column stores?
OLTP (online transaction processing) handles many small, concurrent reads and writes that touch a few rows. OLAP (online analytical processing) runs fewer, heavy queries that scan and aggregate millions of rows.
| OLTP | OLAP | |
|---|---|---|
| Examples | orders, payments, user accounts | dashboards, BI reports, data science |
| Query shape | WHERE id = ?, short transactions |
GROUP BY over large date ranges |
| Schema | normalized (3NF) | star or snowflake schema (facts and dimensions), often denormalized |
| Storage | row store | column store |
| Indexes | B-tree on keys | few indexes, scans with compression and partition pruning |
| Concurrency | thousands of small transactions | few big queries |
| Data freshness | current | loaded in batches or streams |
SELECT * WHERE id = 7).Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.