You intensively use workflows in Microsoft Dynamics CRM 4.0. When the workflow rules update Microsoft Dynamics CRM records, many Workflow Expansion Task records are created in the AsyncOperationBase table of your MSCRM database. However, when the jobs are completed, the Workflow Expansion Task records remain in the database. Therefore, the AsyncOperationBase table continues to grow. Eventually, performance decreases.
Note The AsyncOperationType property for these records is 1.
This problem is fixed in the latest cumulative update rollup for Microsoft Dynamics CRM 4.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
949256 Microsoft Dynamics CRM 4.0 updates and hotfixes
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
Install this cumulative update rollup on computers that are running the Microsoft Dynamics CRM server components and the Microsoft Dynamics CRM client for Outlook components.
After this cumulative update rollup is installed on the Microsoft Dynamics CRM server, you must enable this cumulative update rollup. To do this, follow these steps:
Click Start, click Run, type regedit, and then click OK.
In Registry Editor, locate the following subkey:
Determine whether a DWORD registry entry that is named AsyncRemoveCompletedJobs exists. The value data of the AsyncRemoveCompletedJobs registry entry must be 1.If the AsyncRemoveCompletedJobs registry entry does not exist, add the entry by following these steps:
Right-click MSCRM, point to New, click DWORD Value, and then type AsyncRemoveCompletedJobs in the Name box.
Double-click AsyncRemoveCompletedJobs, and then type 1 in the Value data box.
Click Start, click Run, type iisreset, and then click OK.
Note If the value in the Value data box for the AsyncRemoveCompletedJobs DWORD value reverts to 0, Microsoft Dynamics CRM will continue to retain the Workflow Expansion Task records in the database even if the tasks are completed.
Note This hotfix is proactive only. Therefore, when the hotfix is installed and activated, only new Workflow Expansion Task records are deleted automatically.
If the AsyncOperationBase table and the WorkflowLogBase table are already large because of these workflow records, you must perform a cleanup of these tables by using the Microsoft SQL Server cleanup script that is included in the following Microsoft Knowledge Base article:
968520 Performance is slow if the AsyncOperationBase table becomes too large in Microsoft Dynamics CRM 4.0
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about the AsyncOperationType class, visit the following Microsoft Web site: