I have a restlet that runs a query and returns the...
# suitescript
e
I have a restlet that runs a query and returns the results as a JSON object. The first time I run it, the response takes 20seconds. Everytime I run it after (results don’t change) it takes 8 seconds. Anyone know why this would happen?
a
low level of certainty on this but I'd assume NS is caching the results or something in the SQL DB
☝️ 1
j
Yeah I’ve noticed similar. I think there’s definitely some caching going on with queries.
e
My guess is Oracle's SQL result cache. There are a few questions about it on SO.
s
also presume the optimized query itself is cached for some time after initial run
a
Hi Eric, I want to ask, where do you call restlet from? Is it from suitescript too or from Postman?
s
FWIW, for development/testing we use playwright.dev to test restlets.
e
@Armanda I was testing with Postman
a
Okey Thanks, Are You Know how to call Restlet form another SuiteScript with Auth Headers ? or form another Script outside Netsuite