What gives the most efficeincy
Hi guys, I am a non dev but I have dev question.
I have a solution provided to me by one of my devs, it is a Map/Reduce Script. I the code the dev is creating and configuring 4 separate searches to return various sets of data which are used in a calculation.
My question is, Would it be more efficient to replace the searches being created every time the script runs with SuiteQL queries.
I know I can get more data targeted via the query which may save some coding, but I would like to know if replacing them like for like, in other words they both return the same dataset, would be faster or not?
This depends on how complex the searches are.
SuiteQL, nines times out of ten is faster.
While trying to combine the searches into one query can be done and could be faster, depending on the complexity could run slower.
But replacing individual searches with individual queries will be faster and more readable than a single complex query.
Since SuiteQL supports ad-hoc joins, you may also be able to combine the multiple searches into fewer, faster searches via that technology.
In my experience so far, SuiteQL executes faster than traditional saved searches (in scripts).
I have one process flow for how map/reduce script will work. If your requirement was as this flow you can use map/reduce script.