[SalesForce] Batch Apex Average Time

I scheduled a batch apex class to delete around 350,000 records on Friday evening, the process has been running over the weekend and this morning it's still on the batch 416 out of 1668, is it normal for batch apex to take such a long time?. There are no dependencies on this deletion but I am curious as to why it's taking so long. Perhaps, it's because I didn't specify a batch size and it's running on the default batch size?

public void QueueCleaner(){

String query = 'SELECT id FROM Case WHERE OwnerId = \'00G50000001Pdd2EAC\'';

            BatchJunkDelete batchApex = new BatchJunkDelete(query );
            ID batchprocessid = Database.executeBatch(batchApex);


            }

Best Answer

Basically its an async job .Asynchronous apex executes when resources get available in the salesforce servers so its normal that sometimes it takes time .

There can be one more reason is your code .If its not optimised it may take time .

Also if it was only for simply deleting using bulk API or data loader enabled with bulk API would have processed your job quicker.

Related Topic