Aaron McCausland
06/12/2026, 9:01 PMCeligo AI
06/12/2026, 9:01 PMAI generated answer (using internal Slack threads):Based on the conversations, it appears that NetSuite does not cache the results of
Search.getRange() and Search.runPaged(). The performance difference between these two methods is not due to caching but rather the governance units they consume. Search.runPaged() and PagedData.fetch() consume 5 units per 1000 results, while ResultSet.getRange() consumes 10 units per 1000 results. Therefore, using Search.runPaged() is more efficient in terms of governance units.
However, it's important to note that the performance of these methods can also depend on other factors such as the number of results and the number of columns returned. For large result sets, it might be more efficient to use a lazy processing approach where only a single page of results is held in memory at any given time.
Here is an example of how to use `Search.runPaged()`:
javascript
var sea = search.create();
var pagedResults = sea.runPaged({
pageSize: 1000
});
pagedResults.pageRanges.forEach(function(range) {
var page = pagedResults.fetch({
index: range.index
});
page.data.forEach(...);
});
And here is an example of how to use `Search.getRange()`:
javascript
var sea = search.create();
var resultSet = sea.run();
var i = 0;
while(true) {
var results = resultSet.getRange({ start: i, end: i + 1000 });
results.forEach(...);
if (results.length < 1000) {
break;
}
i += 1000;
}
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
06/12/2026, 9:01 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.850830197
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.844482422
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.844177127
Celigo AI
06/12/2026, 9:01 PM