Project 01 / SQL & reporting
Speeding up an operational report
A report took about 35 seconds to run. After some SQL and backend changes, it was down to roughly 2.
The starting point
An operational report took about 35 seconds to run. It depended on an existing system, so I needed to understand what it was doing before changing it.
My part
I worked on the queries, data access, and backend code behind the report.
How I approached it
Find the slow part.
I followed the work from the request to the finished report to find the bottleneck. That gave me a useful place to start.
Do less unnecessary work.
I improved the queries and data access, and cut processing that wasn’t needed. I worked within the existing system’s constraints.
Check the results.
I checked that the changes preserved the report’s output. Getting an incorrect report faster wouldn’t have helped.
The result
The runtime dropped from about 35 seconds to approximately 2 seconds.
Times are approximate.