Which of the 3 scenarios sound the most efficient?
1- Make a single Moralis query to retrieve a table of 3k objects and then compare them with another table of 3k objects locally-> Implies many js loops which sound inefficient but one Moralis query.
2- Make a Moralis query.equalTo for every object I want to be comparing. Which means 3k query.equalTo, but no js loop -> load is on Moralis
3- Write a beforeSave trigger cloud function. I save one by one my 3k local objects and then check if each exists on my db with cloud function. This might sound like the best approach. Though ideally, I would do a single bulk write query and then check with a cloud function if a duplicate exists, but as I understood, I cannot make triggers with bulk query.
Any opinion? Did I miss something?