SugarBPM and Database Storage: Best Practices

SugarBPM is a powerful feature in SugarCRM and, for most customers, the centerpiece of their automation strategy. However, when it comes to storage management, SugarBPM can have a huge impact on your instance’s database size.

To help you avoid unnecessary database bloat, I’ve put together this guide on best practices for designing SugarBPM Process Definitions with storage efficiency in mind.

Why Does SugarBPM Consume So Much Storage?

Let’s take a very simple process definition:

  • Start Event
  • Change Field Action
  • End Event
  • Two flow lines connecting them

So, five elements in total.

Now, when a record triggers and runs through this process, it will log at least 7 rows to the database, across three tables:

  • pmse_inbox – A single row as the parent entry for the process.
  • pmse_bpm_thread – At least one row.
  • pmse_bpm_flow – Five rows, one for each step in the process.

Now, imagine this process triggers 10,000 times. That simple process would add at least 70,000 rows to your database!

So, What Can You Do?

You need these automations—of course you do. You wouldn’t have implemented them otherwise. My goal isn’t to discourage you from using SugarBPM, but to help you apply best practices that keep storage accumulation to a minimum.

Some logical questions you might ask are:

  1. How essential is this stored data for SugarBPM to work?
  2. What does this stored data do for me once the process is completed?

For the most part, this data is not essential—but before you rush to delete it, we need to discuss one key reason why some of it must be kept.

Best Practice #1: Avoid Using "First Update" in Start Events

If any of your Start Events are configured with "First Update", Sugar needs to retain at least one row in the pmse_bpm_flow table for each record that triggered the process. This is how it remembers that the process has already been triggered for that record—so it doesn’t trigger again.

Small blue diamond Recommendation: Avoid using "First Update." Instead, set your Start Event to "All Updates" and use criteria to prevent unnecessary triggers.

Personally? I recommend never using First Update at all.

Best Practice #2: Retain Only Relevant Process History

Process Management provides a ListView of processes—whether they are In Progress or Completed.

This is where all that stored historical data comes into play. But let’s be real—how often do you actually need to look up a completed process from a year ago? Five years ago? Probably never.

The only reason to keep this content is for:

White check mark In Progress processes – You don’t want to delete these.
White check mark Recent history – In case you need to investigate an issue.

Everything else? Purge it.

Small blue diamond Recommendation: Keep In Progress processes, maintain a rolling month of history, and purge the rest regularly.

Best Practice #3: Use Data Archiver to Purge Old SugarBPM Data

One of the most common questions I get is: “How do I regularly purge this data?”

Answer: Data Archiver.

Set up an Active Archiver to Hard Delete from pmse_Inbox, with filters such as:

  • Status is NOT "In Progress"
  • Date Modified is more than 30 days ago

With the scheduler running at a frequency that makes sense for your system, your SugarBPM history will be kept to the necessary, useful minimum.

Small blue diamond Caution: Data Archiver does NOT have filters to protect against "First Update" usage. (See Best Practice #1)

Best Practice #4: Eliminate Redundant Process Triggers

If a record triggers a process but doesn’t result in a meaningful change, that’s a huge red flag that your Start Event criteria aren’t restrictive enough.

A common mistake is designing processes where records can go from Start Event to End Event without actually doing anything.

Triangular flag on post Does your process include paths that don’t trigger any actions or Send Message Events?
Triangular flag on post Can a record pass through Wait, Receive Message Events, and Gateways without meaningful change?

If yes, then that process shouldn’t be triggering in the first place.

Small blue diamond Recommendation: Use Start Event criteria to prevent unnecessary process triggers.

Best Practice #5: Prevent Redundant Field Updates

Here’s a sneaky way processes waste storage—they update a field to a value it already has.

Example:
A Change Field action sets Type = Customer. If your Start Event doesn’t include a condition ensuring Type ≠ Customer, then this process will run even when it doesn’t need to.

Small blue diamond Recommendation: Always ensure Start Event criteria prevent redundant updates.

This principle applies even in more complex scenarios—if you’re changing six fields, make sure at least one of those changes is actually necessary before triggering the process.

Best Practice #6: Choose the Right Automation Tool

SugarBPM isn’t always the best choice for automation. Unlike other methods, it logs every step permanently, which can lead to unnecessary database growth.

Consider these lighter-weight alternatives:

White check mark Workflow Management – Best for simple, two-step automations (conditions → actions/alerts).
White check mark Calculated Fields – Ideal when the system should always define a value (e.g., read-only calculated fields).
White check mark Logic Hooks & Custom Schedulers – Require PHP knowledge but offer quiet, efficient automation without unnecessary logging.

Small blue diamond Recommendation: Think critically before defaulting to SugarBPM. Sometimes, another automation method is the better option.

Final Thoughts

By applying these best practices, you can:

White check mark Optimize SugarBPM usage
White check mark Prevent unnecessary database growth
White check mark Ensure automations remain efficient and scalable

If you’re finding that your database is growing faster than expected, take a step back and evaluate:

  • Are you using First Update?
  • Are processes triggering unnecessarily?
  • Is SugarBPM the best tool for the job?

With a strategic approach, you can keep your automations powerful, without the storage headaches.

What are your experiences with SugarBPM storage management? Share your thoughts in the comments!

  • WOW Patrick!  This is GREAT!  I'll be looking into all of the BPM processes I have running.

    As an aside, I recall the time years ago when we were told that the Workflow Management function was being discontinued and we needed to migrate to BPM.  Obviously Workflow Management hasn't been removed.  I have a number of processes that simply send a notice of a change to affected users, or send alerts for an unusual change that should be checked.  I'm thinking those should be moved back to Workflow Management where they were originally since we don't need the audit trail of the alert being sent.

    Bud Hartley | Cape Foulwind, NZ (and Oregon, USA)

  • Agreed, this is an amazing post - thank you  !

    I have also logged myself a task to schedule-in looking through our PD's using first update and then will definitley be using data archiver. 

    We previosly got up to a few million rows in that table.  I contacted support who suggested that they can clear out that table for us - we removed everying older than a month and our storage dropped by about 3.7GB !!

    This is discussed in this post:  RE: Clean audit tables? 

     I quote the support team in my case saying:
    "There is no way via the UI to delete data from a pmse_bpm table."

    But in here it seems we can?  Am I mixing up the tables from this post and the other post? Apologies if so.

    But also in there   raised a good point of caution about the process getting triggered again. I guess that relates to the start events using first update too. 


    Workflow

    Same question from me too:  I thought workflow was legacy and being removed so years ago I moved all that functionality we had into BPM...  it even had a warning on the screen to say dont use it.

    • Maybe Sugar could pick a lane? Wink

    Also just to link folk here towards your other equally ace (kind of related) post for the File System Storage too:
    RE: Reducing file storage consumption 


    Thank you again, 
    Luke.

  • Hello again  ,

    Don't suppose you know if there's a way to filter, or to query the Process Definitions to reveal which indeed have a Start Event of 'First Update'?

    I was thinking custom query perhaps?

    That'd be a great time saver too - thanks in advance.

  • Hi  ,

    Thank you for indicating how the response you got from support did not align with what I've written about here. I apologize for that confusion. Over the year since you received that communication, we have provided additional training around Data Archiver to ensure consistency in our communication. 

    The rows of the pmse_bpm_flow table, which is most often the table consuming the most storage space in regard to SugarBPM, can be indirectly targeted as part of a collection of BPM tables when using Data Archiver.

    Regarding the comments about Workflow Management:
    At this time, there is not an initiative to remove Workflow Management from the application. It is a more veteran feature than SugarBPM and is an as robust in its feature set. I can offer some advantages in some use cases, which is my motive for mentioning it above.
    My advice is to use SugarBPM as your primary source of automation within the application, and to be aware of the capabilities of Workflow Management in the event that employing it for a scenario serves you effectively.

    Regards,
    Patrick McQueen

  • Hi  ,

    This custom SELECT query, which can be run in the Advanced Reports feature of the application, can provide you the ID number for all process definitions containing a first update start event:

    SELECT prj_id FROM `pmse_bpm_event_definition` WHERE evn_type = 'START' AND evn_params LIKE '%updated%';

    The ID numbers provided by this query can be added to the following URL to navigate you to the process definition's design canvas in your instance (also change to your domain to the beginning of the URL):

    example.sugarondemand.com/#pmse_Project/<id>/layout/designer

    Regards,
    Patrick McQueen