On the above screenshot you can see how fast a System Job Table can grow.
Of course if you do not delete them or there is no clean up job. This table is only growing and growing.
This table can become quickly huge, which could result in a lack of performance.
This is documented on a lot forums and Microsoft articles like this.
If you check the consequences performance become slow and service will give errors or crash on the heavy load.
Now why is that? Off course one reason is because the database server has to search all records to see which jobs has to be executed.
But if there are a lot of waiting(crashed) jobs in the table, the system will check this ones every time.
Ok i get that, but what can i do about it?
There are some really nice features in CRM to clean this table.
You can indicate if a system job have to be deleted after it has run successfully and the same for asynchronous plugins.
For plugins open the step in the registration tool and at the bottom you can find almost the same
This is perfect prevention. Now you have 90 – 95 % less record in this system job table.
That’s nice, but occasionally it is a best practice to take all the failed and waiting jobs and delete them as well.
Off course first check the cause of the error and than delete them.
If you are doing great your table is empty, but in reality there will be always some records in there.
But this is how to keep that table empty and your CRM jobs in top shape.
If you want to start but your table is nicely filled. You can delete all succeeded, failed and cancelled jobs through bulk deletion.
If it is really to much, you can look for the sql script on the support page of Microsoft.