its because you are writing lots of data too, not just the searches.
Uhh rethink your logic, stock replenishment can be loaded in a state instead of db and update that state whenever workflow is completed. Sales man average sales isnt so important to calculate it every sale, can do that on a button click or end of the week type thing.
your method looks too complicated, tell me what you are trying to build (in very simple terms) and i will redesign it for you when i get the chance.
Summary of app: Its a 3 in one app, a stock management app and a sales recording app and replenishment generation.
I have a product, whenever the customer sells, the stock database is reduced by the quantity sold, the sellout db is updated with the quantity sold so I can get an average. When the stocks reaches a limit, I can generate a replenishment, that’s the entire summary.