This is a .zip file containing the .sql query files referenced in this blog post:

http://blogs.technet.com/b/servicemanager/archive/2013/01/14/troubleshooting-workflow-performance-and-delays.aspx

The script files are:

 

SubscriptionStatus.sql - query for the current status of subscription workflows

UpdateSubscriptionWatermark.sql - updates the watermark for a given subscription workflow

RelatedEntityChangeLog.sql - advanced queries for troubleshooting situations with custom relationship types