Row store vs column store
A row store keeps each row together, so a sum over 2 columns still reads every column of every row. A column store reads only the 2 columns it needs. For a dashboard over 200 million rows, the replica takes about 60 s and the column store about 0.6 s.
5 MB/s · logs kept on the host · disk full in 33 minutes
2 workers · 1 TB moves in 1.1 h · 1,000 Mbps per card
Case 1
The shop database answers 4,000 queries/s. A dashboard runs 5 queries/s, and each sums 2 columns over 200 million rows. Dashboard p99 must stay under 2 s.
| Measure | Goal | Read replica (rows) | Column store |
|---|---|---|---|
| p99 latency (Shop) | under 50 ms | 3.4 ms Pass | 3.4 ms Pass |
| p99 latency (Dash) | under 2 s | 60.4 s Fail | 560 ms Pass |
| Error rate (Dash) | under 1% | 50.7% Fail | 0% Pass |
| Monthly cost | 64 USD/mo | 64 USD/mo |