Why We Moved Off a Single-Server Database and What It Actually Took

Why We Moved Off a Single-Server Database and What It Actually Took

How one PostgreSQL instance stopped keeping up with 200 users pulling morning reports — and what the move to a proper warehouse actually looked like, from read replicas to Snowflake modeling arguments.

Mark Rikhter
Mark Rikhter
2 min read

 

Our reporting setup ran on one PostgreSQL instance for about two years. Dashboards, ad-hoc queries, scheduled exports — all of it hitting the same box. It worked fine when the company had 50 employees and maybe 3 GB of new data per month.
 

Then we grew. By the time we had 200 people pulling reports during morning standups, the database was choking. Queries that used to take 2 seconds were timing out at 30. The ops team started getting Slack messages at 7am asking why the sales dashboard was blank.

We looked at three options: bigger server, read replicas, or a proper warehouse. The bigger server bought us maybe four months. Read replicas helped with read-heavy traffic but didn't solve the modeling problem — our tables were still shaped for the application, not for analytics. So we went with a warehouse.
 

The migration itself wasn't the hard part. Setting up Snowflake took a couple days. What ate our time was deciding how to model the data once it got there. Which tables become facts, which become dimensions, how to handle slowly changing attributes, what grain makes sense for each report. We argued about naming conventions for two full meetings. Two meetings about column names.
 

And that's the part nobody warns you about — the infrastructure is a weekend project, but the modeling decisions follow you for years. We got some of them wrong and had to refactor six months in. Looking back, we should've pulled in cloud data warehouse consulting services before writing the first CREATE TABLE statement, not after the third refactor.
 

The dashboards are fast now. But the path there had more spreadsheet arguments than I'd like to admit.

More from Mark Rikhter

View all →

Similar Reads

Browse topics →

More in Data Science

Browse all in Data Science →

Discussion (0 comments)

0 comments

No comments yet. Be the first!