4

Our SharePoint site is starting to experience performance issues. In troubleshooting I have found that the workflow history list for the site is not purging after 60 days like it should. As far as I can tell the timer is set properly. Does anyone know I if can purge this list manually without causing any issues to the site?

Would it be damaging to set an information rights management policy to delete after 60 days? We have no need for this data and there is about 4 years’ worth of data so this list is quite large. At any given time we have around 1500 workflows running.

2
  • Be extra sure you have no need for the data - make sure no one else set up the workflow history list to be retained intentionally.
    – Nicole
    Feb 26, 2014 at 21:40
  • There is no need for the data. As it stands now it is in violation of our internal data retention policies.
    – Justin
    Feb 27, 2014 at 14:16

1 Answer 1

1

The timer job for purging workflows only deletes workflows and workflow associations, it does not touch the workflow history list. This was better documented for SharePoint 2010, but the behavior seems to be the same in SharePoint 2007.

You can safely delete items pertaining to completed workflows from the workflow history list, but only if you're certain you won't need that information for auditing purposes.

However, the size of the list is not as important as the efficiency of the queries that are hitting it.

Addressing Workflow History List Performance:

To improve performance of the workflow history list, you should add column indexing to your workflow history list. You can add indexed columns by going to List Settings -> Indexed Columns. I recommend adding an index to List ID, Primary Item ID, Workflow Association ID, Workflow History Parent Instance, and Workflow Template ID.

Nitty Gritty Details - What the timer job actually does:

SharePoint does not purge the workflow history after 60 days (that is, from the hidden workflow history list typically found at "[site]/lists/Workflow History"), but rather purges the workflow and the association between the workflow and the workflow history, which involves deleting associated tasks from the task list. It also causes the workflow status column (if it exists) to stop showing a link to the item's workflow history. That's really all that the 60-day purge does.

From Microsoft's documentation (emphasis mine):

By default, Microsoft SharePoint Server 2010 runs a daily Workflow Auto Cleanup job to permanently delete workflow instances and related task entries that still exist 60 days after a workflow is completed or canceled. Workflow history items themselves are not deleted, but the entry point to view them on the status page for a particular instance of a workflow will no longer be available.

The workflow history list itself can get nice and fat without affecting performance since only small chunks of it are safely queried at a time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.