# My lead asked one question that made my week of optimization pointless — retained record

> Retained reddit record from reddit:developersIndia.

Canonical: https://highsignal.app/data/records/7fff0b65c679c4d7

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:developersIndia)  published 2026-10-13 13:59 ingested 2026-10-14 02:37

[original source ↗](https://www.reddit.com/r/developersIndia/comments/1x4xeen/my_lead_asked_one_question_that_made_my_week_of/)

## retained text



```
In my first job at a small logistics startup, I was always excited to get backend tickets. About three months in, I got a ticket about an internal API used to generate daily shipment reports that was taking about 3 seconds to respond, and my lead asked me to look into it.

I checked the API logs and found that two SQL queries were taking most of the time. One fetched shipment details, and the other retrieved each shipment's delivery status separately. I rewrote the queries, batched some DB calls, and added Redis caching for the report data. It took me almost a week, but I got the response time down from around 3 seconds to 300ms. I added the before and after numbers to the PR and thought I’d done a pretty good job.

Then my lead asked me how many times a day that endpoint actually gets hit. I had no idea. We checked the logs together and found it was getting around 40 calls a day, mostly from one ops guy checking the report in the morning. My lead laughed and said I’d shortened someone’s coffee break by three seconds.

We ended up merging the SQL query fix but left out Redis. His point was fair. We’d have to maintain the cache, handle stale data and deal with another service if something went wrong. Nobody had even complained about the report being slow. I’d spent almost a week on something that wasn’t causing much trouble in the first place.

Has anyone else spent days optimizing something that barely got used?
```



document fetched 2026-10-14 00:24 · canonical https://reddit.com/r/developersIndia/comments/1x4xeen/my_lead_asked_one_question_that_made_my_week_of
