Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it true that running a batch class in Sandbox with incredibly simple task takes too long than Production?

I've tried @future with the same task and it process my Streaming API immediately.


I've never used a Production before. I googled why is my batch apex takes time to execute and I've come across this page :

I need a confirmation from experts here in Salesforce StackExchange.

Please help me.

share|improve this question
up vote 3 down vote accepted

Asynchronous code execution for batch apex and @future methods is heavily dependent on what else is going on in that same system at any given time; Salesforce is a multi-tenant system, meaning your sandbox is not the only org running on the hardware and work has to be load-balanced and kept in check to ensure that all orgs have a suitable amount of resources available (e.g. CPU time).

Generally the batch shouldn't take a different amount of time to run over similar data counts, so either your sandbox instance is under heavy load or perhaps you're running much larger data volumes on the sandbox than in production. If it's not data volumes then there's not much you can do to speed it up (perhaps some database indexes will be of use), but it shouldn't be too concerning if things in production are ok. If the data levels are lower and you experience this same slow performance over a few days then it's probably time to file a support case.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.