ANS-1001 · WEB SERVICES & INTEGRATIONS

How to Optimize NetSuite Web Service Searches for Large Result Sets?

Optimize NetSuite web service search performance by specifying a limited set of fields to return when handling extensive datasets.

Short answer

To optimize NetSuite web service searches for large result sets, utilize `ItemSearchAdvanced`, `ItemSearchRow`, and `ItemSearchBasic` objects. These objects allow you to explicitly define and limit the fields returned, significantly improving performance and reducing data transfer when dealing with extensive search outcomes.

Scenario

When developing NetSuite web service search routines, it is common to encounter scenarios where a search is expected to return a substantial volume of results. Returning all available fields for every record in such cases can lead to performance degradation and increased processing time.

Solution

When a web service search routine is designed to return a substantial volume of results, it is possible to optimize performance by instructing the search to return only a specific subset of fields. This approach significantly reduces the amount of data transferred and processed. The capability to achieve this is provided through the use of ItemSearchAdvanced, ItemSearchRow, and ItemSearchBasic objects. The following objects are typically utilized in this process:

ItemSearchAdvanced search2 new ItemSearchAdvanced();

ItemSearchRow isr new ItemSearchRow();

ItemSearchRowBasic isrb new ItemSearchRowBasic();

ItemSearch is new ItemSearch();

ItemSearchBasic isb

Expert NetSuite Support

Need help with this NetSuite issue?

Web Services & Integrations consulting and configuration support

Talk to a consultant