Use short-lived processes whenever possible. Short-lived
processes do not store process data in the database. The disadvantage
of using short-lived processes is that their status and state are
not tracked in Administration Console and there is no history of
the process.
Some service operations, such as the Assign Task operation (User
service), require that they are used in long-lived processes. In
this case, you can segment the process into several subprocesses
and make them short-lived when possible. If you use this strategy,
short-lived subprocesses should handle large data items, such as
document values.
Use variables sparingly. When using long-lived processes, for
every process instance, space is allocated on the database for each
variable in the process. Strategic use of variables can save a considerable
amount of space. For example, you can overwrite variable values
when old values are no longer needed in the process. And delete
any variables that you have created and are not using. You can validate
the process to find unused variables.
Use simple variable types (for example, string or int) and avoid
using complex variable types when possible. Database space is allocated
for variables even when they do not contain a value. Complex variables
typically require more space than simple ones.