Database
Writes and ingestion
Who writes what, how often it changes nothing, and whether imports survive retries and corrections.
- Map every place that writes to the databasePromptSeveral jobs, functions, APIs or agents change the same data, or nobody is sure who owns it.
- Stop rewriting data that hasn't changedPromptUpserts and updates run at high volume, imports are costly, or vacuum and write-ahead log churn look high.
- Is our ingestion process more complicated than necessary?PromptThe import pipeline is long, slow to correct, or does the same work at several stages.
- Can we rerun everything without damaging the data?PromptImports get retried, schedulers overlap, files are replayed, or runs fail halfway.
- Find where write logic should livePromptBusiness rules are split across SQL, triggers, edge functions, server routes and workers.