DEV Community

Serguey Shinder
Serguey Shinder

Posted on

Our Sales Dashboards Refreshed All Night and We Paid for Every Run

Two years ago finance and sales moved their reporting to a cloud data warehouse. It charges for compute by the second while queries run, and we choose the size of the compute ourselves. We liked that. We would pay for what we used, and nothing would sit idle.

By March the warehouse bill was three times what it had been the summer before, while the number of people using the reports had barely changed. The query history explained it. About seventy percent of all compute was spent on scheduled dashboard refreshes, and most of those ran at night. Each sales dashboard had been set to refresh every fifteen minutes, because the regional managers wanted the figures to look current during the day. The setting applied twenty four hours a day, seven days a week. A dashboard with eight charts sent eight queries on every refresh, each one woke the compute cluster, and the cluster then stayed running for its idle period before suspending. Between them, forty dashboards kept the warehouse awake almost continuously so that nobody could look at them between midnight and six.

Nobody had made a careless decision. The analysts set refresh intervals in the reporting tool, which did not show what a refresh cost. My department paid the warehouse bill, which did not show which dashboard had caused it. Each side could see half of the arrangement.

The refresh settings changed first. Sales dashboards refresh every fifteen minutes in working hours on weekdays and hourly otherwise. Most finance dashboards refresh once a morning after the nightly load, which is the only time their data changes. Dashboards nobody had opened in sixty days stopped refreshing altogether. Reports now read from summary tables built once after each load, rather than recalculating from individual transactions every time. The cluster serving dashboards is smaller and suspends after one idle minute. Each department now has its own cluster, so the monthly bill shows where the compute went, and the analysts receive a copy.

The bill fell by a little under sixty percent in two months, and nobody has noticed any difference in the reports.

Paying only for what you use sounds like a saving. It is one only when somebody looks at what is being used.

– Serguey Shinder

Top comments (0)