Content
@
0 reply
0 recast
0 reaction
df
@df
best practices for caching an external API of list of results to a postgres DB with a table of results. Doing updates + inserts - upsert or copy or something else. Is there a no code tool or service that does this perhaps?
9 replies
1 recast
17 reactions
Joe Petrich 🟪
@jpetrich
It matters how much data this is, how often you'll be updating it, and how much you expect the data to change. I think in non extreme cases you can write a single statement to upsert the new data every time with an updated_at column and when you query, ignore stale data by querying since an update time.
1 reply
0 recast
1 reaction
Joe Petrich 🟪
@jpetrich
Then you can have a janitor job or a second query that runs and deletes old rows depending on how much you care about getting rid of it and on what time scale
0 reply
0 recast
0 reaction