I added one annotation to a Java entity class. Two lines of code. The PR
diff was so small that our reviewer almost skipped it.
That change cut the bytes written to our SQL transaction log on every UPDATE
by roughly 90%, eliminated unnecessary index maintenance on 17 nonclustered
indexes, and brought our peak database wait times from minutes down to near
zero during the busiest job of the day.
Here's what happened, why it happened, and how you can check whether the
same thing is quietly hurting your service right now.
The setup
We run a Spring Boot service backed by Azure SQL (SQL Server). One of our
core tables — let's call it MEMBER_PROFILE — stores member profile and
loyalty data. It has 22 columns : ids, names, statuses, timestamps, JSON
blobs, and an optimistic-lock version.
Every day a scheduled cron job processes metric-update events. During peak
hours this job handles tens of thousands of events per minute.…