Least taxing way to query and update a table field?
I have a table called favourites, that will store a list of favourite names. For example, lets just say these can be things like
My server side code has an endpoint that receives thousands of external webhooks every 24hrs. What I want to do is when these webhooks come in, look at that data, check a field and see if it exists in the favourites table. If not, add it, if it does, ignore it.
To me, doing the same lookup query for every single request seems a bit silly, since it'll add thousands of database queries.
Is there a better way to do this? All my endpoints are serverless, so storing something in memory isn't really doable either.
dog, cat, mouse etcMy server side code has an endpoint that receives thousands of external webhooks every 24hrs. What I want to do is when these webhooks come in, look at that data, check a field and see if it exists in the favourites table. If not, add it, if it does, ignore it.
To me, doing the same lookup query for every single request seems a bit silly, since it'll add thousands of database queries.
Is there a better way to do this? All my endpoints are serverless, so storing something in memory isn't really doable either.