CRM 2011 – How not to clutter up your CRM Async table

Today I have a bit of a Kerberos double hop of a blog post and anyone who laughed at that joke really is a CRM geek.

On one my favourite CRM blogs Jamie Miley he had a blog post called

Improving Async Performance in One Click in Microsoft Dynamics CRM 2011

well he then linked  to a very interesting post by Gonzalo Ruiz

Improving Async performance in oneclick

By this point you are wondering what the hell the blog post is actually about but I thought the information in the two blog posts is so important it should told to as many people as possible.  Also well done to Gonzalo Ruiz for writing a great blog post and having an interesting blog.  Anyone who used CRM 4 will know the AsyncOperationBase database table would slowly get clogged up because it kept data about any system jobs/workflows/plugins as well as individual workflows/plugins and async jobs.

When we reported speed issues to Microsoft they gave up some scripts to run which would clean this table up.  I believe that when you upgrade you database from CRM 4 to CRM 2011 the scripts clean up this table for you (although I would recommend doing it yourself before you upgrade to save time)

In CRM 2011 there are a couple of areas where you can state you don’t want workflows that succeeded to be entered into the table.   If you click the workflow and then go into administration tab.  Interesting dialogs do not have the option to delete when complete.

I was wondering if this is always a good choice to stop logging successful workflows.  You probably only want to see the workflow records of failed workflows but when you are developing a workflow it’s useful to click on a workflow result record and check the entities is created/updated to make sure it has done it correctly.  For workflows which are well tested and don’t fail very often then it’s probably a good idea and the benefits of decluttering the AsyncOperationBase are certainly worth it.

The same option is now available for asynchronous plugin steps as well:

This allows you to pick and choose which workflows and plugins are worth storing as system jobs every time they execute and which ones you want to delete upon completion to save space!

However, in order for the async auto-delete feature to take effect, you must first make sure that the “auto-delete” feature is enabled for the organization. There is a master switch that must be turned on:

select BitColumn from OrganizationProperties where ColumnName = ‘AsyncRemoveCompletedJobs’

Note that you can have a different value in that setting for each organization. In CRM Online, this value is always 1 (enabled) for all organizations.

2 thoughts on “CRM 2011 – How not to clutter up your CRM Async table

  1. Jamie Miley May 25, 2011 / 2:33 pm

    How funny would it be if I reposted this post back on my blog 🙂
    Triple hop? Divide by Zero? Humidifier in the room with the Dehumidifer? 🙂


  2. Hosk May 25, 2011 / 7:12 pm

    we would be caught in the mobius, when time becomes the loop.

    I was going to link just to the blog but I did read it on your blog first, so I thought I should credit you with finding a great blog post.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.