0 votes

We can call another batch from the finish method of one batch, then why do we need Queueable apex

1 Answer

0 votes
Best answer

They just have different use cases.

  • Most crucially, you can have only 100 batch jobs pending at any given time. I do not believe any such limit exists for Queueable jobs.
  • Queueable jobs will also tend to execute faster as they have less overhead to deal with (no start/finish).
    • Generally, batches should be used to act over moderate to large database queries, whereas Queueables should be used to execute smaller increments of work more quickly.
Welcome to Memory Exceeded, where you can ask questions and receive answers from other members of the community.