I've been developing with SQL for way too long, so...
# suitescript
t
I've been developing with SQL for way too long, so I find SuiteQL to be very helpful - especially with the integration work that I do. SuiteQL has some weird quirks, but all in all, it works very well. And it's extremely fast, too... And you can get up to 5,000 records at a time if you use the query module. If you're interested, there are a bunch of example queries available on my blog ( https://timdietrich.me/blog/ ), for getting everything from AR, AP, inventory, etc.
e
Have you done any benchmarking between the two? (
N/search
vs
N/query
)
t
@erictgrubaugh and I have talked about doing that, but haven't yet. I think someone here posted recently that the topic had come up during a "NetSuite Now On Air" session. I have found that using SuiteQL in a RESTlet is generally faster than using it via SuiteTalk REST. There are some funky things that they're doing with SuiteTalk and SuiteQL. I think that when you use a RESTlet the results are a bit more pure, if you know what I mean.
e
Anecdotal benchmarks of very simple searches/queries (no joins, no formulas) showed no appreciable performance difference in the browser console. That's all the further I've taken it. I wrote about my comparison of the modules here: https://stoic.software/query-v-search/
e
Thanks, guys. I have some searches with substantial result sets, maybe I'll give n/query a shot
t
@ehcanadian If you need help converting a search to a query, give me a shout.
e
I may take you up on that Tim, thanks!
👍 1
m
This is the claim from NetSuite about SuiteQL being up to 100% faster than search API. I would normally take such claims with a huge grain of salt but my own testing has shown pretty considerable performance benefits with SuiteQL
e
Is it specifically SuiteQL, or any Query?
i.e. is it just
runSuiteQL()
that's (allegedly) faster? Or the entirety of N/query?
m
It sounds like the whole query API to me
Actually the claim is query api is up to 100% faster than search api, and then there is a second claim that SuiteQL is up to 200% faster than query API
Interestingly I had previously tested with a pretty big dataset and got about 50 secs with SuiteQL and 1m 20 secs with search API. I just re-ran the test now and am getting 50 secs for search and 60 secs with SuiteQL 🤔
t
That is odd. If you think about it, when you're doing a search, under the hood it almost has to be being translated into SQL.