Thanks. I was exceeding the usage limit in a suite...
# suitescript
a
Thanks. I was exceeding the usage limit in a suitescript because of a suiteql query I ran every line of a file so I constructed one ginormous query with hundreds of OR clauses. Am I a clown or is this a common pattern?
b
depends on the query
usually you do something like use the in operator
a
I need it because of like.
LIKE sql operator.
s
sounds like a tough query
b
i dont think you can use
in
with
like
a
Hence the OR as I outlined in my question.
Will a bigger query use more usage units?
s
The query size should not matter, the number of the results matters (in search) if you are using
runPaged()
and
.fetch
, so I would imagine the same idea applies to query
a
what about
asMappedResults()
?
s
you can look at the help documentation, it tells you how many governance units each call uses
If the documentation is not clear, then you check in your script with runtime and getting the current script
a
Apparently as long as I want. Only 10 units. Pretty cheap if you ask me.