Is using SuiteQL faster than the search module?
# suitescript
m
Is using SuiteQL faster than the search module?
n
Anecdotally i would say yes, but im not sure if there is any benchmarks out there that say whether or not it is. I also didn't look very hard though. I tend to always use suiteQL in client scripts because it feels faster. And i like that it returns the data in a nice neat object for me. I think the main difference comes down to functionality. https://stoic.software/query-v-search/ This article here breaks it down pretty well.
s
I'm using SuiteQL all the times. For what I've experience, SuiteQL is significantly must faster
s
Speed aside, I mostly use query now, just because it’s a whole lot easier for our other developer to understand, even those without much NetSuite knowledge, whereas saved searches either were confusing to non-NS devs, or they were loading existing saved searches that they did not have access to. Overall, I feel like SuiteQL leverages the existing SQL knowledge many developers already have and therefore makes for easier to maintain code. I only use saved searches in my 1.0 code, such as plug-ins, that can’t be upgraded, and I also use search.lookupFields in some places just because it has extremely low governance cost and is convenient for looking up just a few fields.
💯 1
s
Excellent point !!!
s
We are merging an existing NS account into our own, which has a whole bunch of old 1.0 scripts. I plan to migrate them all to SS 2.1 and replace searches with queries wherever possible, as time allows.
m
So a lot of people use SuiteQL. I guess browser extensions that give you N/search module code from saved searches made me lazy.
s
In many cases, you can build a SuiteQL query from the saved search code (SELECT columns FROM type WHERE filters). There are some instances where the column names change or the filters work differently, but it’s a good place to start.
m
Yeah, will try to get used to it. Thanks.
s
A huge win with SuiteQL is ad-hoc joins
also note, #C01FBBZ8PQC dedicated channel for this topic