0

I've built a custom REST API Endpoint in Salesforce that does a simple query, an external ID is passed to it, and the Salesforce ID is returned as JSON - nothing complex.

I have not yet deployed to production, just running in a standard developer sandbox. but am currently worried about the speed - is there anything in the Salesforce documentation around the speeds in sandboxes vs the speed in production, relating to API and Database?

1 Answer 1

2

The performance of operations on a Salesforce org may vary based on a wide variety of factors, including

  • The overall load in your org, for some operations such as asynchronous code.
  • The overall load on the instance where your org lives.
  • The data volume in your org, including both overall quantity and data shape issues like skew.

Some of these things are wholly or partially outside of your control, and they're not easy to visualize or monitor without close investigation.

There are certainly things you can do within your code to ensure that it is performant. Performing selective queries based on indexed fields is a big one, which it sounds like you're already doing. If your code does no more than perform an optimized query and return a result, there's likely little more that you can do to optimize its performance.

You could consider, based on your description of this code, relying on the native REST API instead to get a record by External Id.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .