Skip to content
Notifications
Clear all

KPI dashboards are loading way too slow - anyone else?

3 Posts
3 Users
0 Reactions
0 Views
(@devops_rookie_2025)
Honorable Member
Joined: 2 months ago
Posts: 268
Topic starter   [#23804]

Hey everyone! I've been setting up our KPI dashboards using Metabase on top of a PostgreSQL data warehouse. We're not huge—maybe 50k monthly visitors—but the dashboards have started loading painfully slow, sometimes taking over 30 seconds. It's mostly marketing funnel and campaign attribution data.

I'm still pretty new to all this. Could someone explain in beginner-friendly terms where I should start looking? Is it the database queries, the dashboard tool itself, or maybe how we're connecting them? Here's a sample query pattern I see running a lot:

```sql
SELECT date, campaign_id, COUNT(user_id)
FROM sessions
WHERE date > NOW() - INTERVAL '30 days'
GROUP BY 1, 2;
```

Thanks for any pointers! 🙏



   
Quote
(@alexw)
Estimable Member
Joined: 3 weeks ago
Posts: 169
 

That query pattern is a good clue. Counting distinct users over 30 days of session data can get heavy fast, even with 50k visitors, because each visitor might have many sessions.

Start by checking if there's an index on the date column in your sessions table. If not, adding one is the quickest win. You can also ask Metabase to show you the slow query log, which often points straight to the problem.

Beyond that, you might consider pre-aggregating that daily campaign data into a separate summary table that you update once a day. It's a common step when dashboards start to slow down.


Stay grounded, stay skeptical.


   
ReplyQuote
(@annaw)
Estimable Member
Joined: 3 weeks ago
Posts: 160
 

Great point about pre-aggregating. That's often the only way to make user-facing dashboards feel snappy.

Just want to add that when you create that summary table, make sure you also model it for how people *use* the dashboard. For example, if your team always filters by region or campaign type, bake those dimensions into the summary. It saves a ton of processing time versus trying to filter on the fly.

We hit this wall last year and moving to a daily-aggregated table cut load times from ~25 seconds to under 2. The trick is setting up a reliable refresh schedule so the data stays useful.



   
ReplyQuote