Salesforce has a multitenant architecture therefore any action is executed in a transaction that has a limited amount of time and space. But sometimes there is a need to overcome that limit and that is when asynchronous apex comes into the picture.
There are 4 types of asynchronous apex available and each one has separate use cases:
- Batch Apex
- Queueable Apex
- Schedulable Apex