Skip to content

Case study 13 · Data and infrastructure

Speeding up a report without changing its queries or schema

For a supplier to large US retail chains, the largest customer's sales report went from over fifteen minutes to 0.2 seconds. No saved report had to be rebuilt.

EngagementData warehouse architect · 2025 – present · direct client · the choice of warehouse was minePublished

over 15 minutes → 0.2 seconds

Largest customer's report

4 minutes → 0.1 seconds

A second report

No customer had to rebuild a single saved report

The story in 5 steps

Stack

  • Amazon Redshift
  • S3
  • MySQL
  • materialized views

01 · Context

The client supplies fashion accessories to large American retail chains, and those chains read their own sales data through a BI tool.

The largest customer's report went from over fifteen minutes to two tenths of a second, and a second report went from four minutes to a tenth.
Nielsen Norman Group puts the limit for an uninterrupted flow of thought at 1 second and the limit of attention at 10 seconds, after which users go and do something else.

02 · Could not change

The report is part of what the client sells: their customers open it to see how their own products are moving.

The queries belong to the BI tool, which generates them, so there was nothing to rewrite.
What was left was to keep the queries and the schema exactly as they were and change the system they run against.

03 · What I did

I chose Redshift because the client was moving every service to AWS.

There was no migration in the usual sense, because existing jobs already exported data on over 200 million products from the MySQL source system to S3.
I chose the distribution and sort keys from the queries the BI tool actually runs.
I moved the heaviest reports onto materialized views with dependent views built on them, refreshed incrementally once a day.

04 · Result

Largest customer's report: over 15 minutes → 0.2 seconds

A second report: 4 minutes → 0.1 seconds
No customer had to rebuild a single saved report
Daily refresh, validated against the source

05 · Differently

Daily refresh was right for this data, which arrives daily anyway.

Related services

The services that draw on this work.

Related writing

Posts that came out of this project.

Case study 13

Working on a similar problem? We reply within one business day.

The first call takes 30 minutes, and you’re under no obligation.

Tell us about your projectcontact@microtech.consulting