Why updated_at changes every night when nothing changed
You've built a nightly load. It pulls customer accounts from your product's API into the warehouse, and to keep it cheap it only fetches rows whose updated_at moved since the last run. Then you look at the numbers. Almost every account changed last night. And the night before. Nobody edited them. The values you care about are identical.
So the incremental load is really a full reload. Worse, you can't use the changed accounts to decide which related data to refresh, so you reload all of that too.
This is a familiar surprise in data work, and it's usually slow to untangle. The field is called "updated at", so everyone assumes it means "something changed". Finding out what actually writes to the record means asking an engineer who knows that corner of the system, or reading code you've never seen. Both can be slow.
Here's how it unravels when you ask the codebase directly, one question at a time, using a realistic example, and what to take from it for your own system.
Start with the plain question
Start with the obvious question, in plain English. Ask something like: what writes to these records overnight, and why does the timestamp move when the data looks the same?
In our example, the answer names a nightly sync with an outside system. For each account, the job fetches fresh data from that system and then saves two bits of bookkeeping onto the account itself: when it last synced, and whether that sync worked. Because the sync time is new every night, the row is saved every night, and updated_at moves with it. A failed sync records the failure, so failures move it too.
The key detail: neither of those fields appears in the API response. To anyone reading the API, it looks like nothing changed. To the database, something did.
So this isn't a bug where the system saves rows for no reason. It saves real changes to fields you can't see.
Ask what it isn't, too
A good follow-up is to ask which other jobs run in the same window and why they're not the cause. A good answer goes through each one. In the example, some jobs only touch a small subset of accounts, and others write to different tables entirely.
This matters because it lets you check the explanation. If the sync is the cause, the number of accounts that move each night should roughly match the number of accounts the sync picks up. A good answer spells out which accounts the sync includes, so you can count those yourself and compare. When the numbers line up, you can trust the explanation. When they don't, there's a second cause to find.
Ask whether a setting can stop it
Next, ask whether it can be turned off. Here the answer is no. Nothing in the product's settings controls it. Stopping it would take an engineering change, such as storing the sync details somewhere other than the account record, or writing them without touching updated_at.
That's useful to know early. It tells you whether to wait for a fix or design around the behaviour. In this example, it means designing around it.
Ask what else would tell you about real changes
The most valuable follow-up is to ask whether any other field, endpoint or event only changes on a genuine edit.
In the example, three things come back, and one of them is a surprise.
First, the webhook. The webhook that fires when an account is saved goes out on every save, with no check for meaningful changes. So the nightly sync sends one event per account. But each event carries a list of which fields changed, with before and after values. For sync-only saves, that list holds only the sync fields and the timestamp. Filtering those out leaves real edits, including any made overnight.
Second, related data lives in different places, each with its own rules. Some related records have their own timestamps that only move when the data really changes. Others have no timestamp at all, and some values are calculated fresh on every request, so there is nothing to compare. Those have to be pulled in full, whatever you do with updated_at.
Third, the surprise. Contact details aren't stored on the account at all. They live on a separate related record with its own timestamp, and editing them doesn't move the account's updated_at. So even if the nightly noise were fixed, an incremental load keyed on the account would still miss real changes to the details people care about most. That related record's own timestamp is the one to follow for those changes.
That third point is easy to miss. It's not in most API docs, and it's the kind of thing you only find by reading how records are saved.
What to watch out for
"Updated at" means "saved at". In most systems the field moves whenever the row is written, for any reason. Sync bookkeeping, counters, cached totals and "last seen" stamps all count. Never assume it means a field you care about changed.
Hidden fields still change rows. If an API or export leaves out internal columns, saves to those columns still move the timestamp. Ask which fields a job writes, not just which records.
A parent record may not notice its children. Whether editing a related record moves the parent's timestamp depends on how the code is written. Ask for each related piece of data you load.
Check old answers. Something you were told months ago, say that a job was retired or a field isn't used any more, may no longer be true. Code changes, and earlier answers can go stale. When a decision depends on it, ask again against the current code.
Confirm with your own data. Use the answer to make a prediction, such as how many rows should move each night, and check it with a query before you rebuild anything.
A reusable checklist
When a timestamp, status or total doesn't behave the way its name suggests, ask these, in this order:
- What writes to this record, on what schedule, and which fields does each writer change?
- Which of those fields are hidden from the API or export I'm using?
- Which other jobs run at the same time, and why aren't they the cause?
- Can a setting change this, or does it need engineering?
- Is there an event, field or endpoint that only changes on a real edit? Does it include a list of what changed?
- For each piece of related data I load: where does it live, does it have its own timestamp, and does editing it move the parent?
Then turn the answer into a number you can check, and check it.
In the example, the way forward follows from the cause: follow contact detail changes through their own timestamps, filter account events down to ones with real field changes, pull the small set of untimestamped data in full, and ask engineering to keep sync details off the account record.
Compiler lets anyone ask questions like these of their own codebase, in plain English, from the web, Slack or their AI tools. If you'd like to try it on yours, you can try Compiler free.