Posts

Showing posts with the label sql

Empty AsyncOperationBase table when it is too big

Image
With one of my client, I came across a particularly disturbing issue. The symptoms were: 2 minutes to delete a single record   Timeout on restarting the Microsoft CRM asynchronous processing service   Unable to display a view on workflows or system tasks.   Incredibly long time wait for any SQL statement on AsyncOperationBase table Passing a script on the organization database to identify the sizes of tables, I realized that two tables seem particularly large:  AsyncOperationBase (800 000 lines) DuplicateRecordBase (15 000 000 lines) The total size of the database was 12GB.   After passing through the Microsoft support for a procedure to purge these tables, the answer was procedures that would require whole days of SQL processing, which was clearly not an option for a production server.   In agreement with my client, we decided to delete and recreate these tables instead of trying to empty them.   WARNING! The follo...