A histogram, or resource status history table, for multiple resources is
created and maintained. A transaction or resource manager arranges and/or
reorders various resources into a sequence based on the histogram such
that read-only resources are prepared first and a sole non-read-only
resource need not be prepared, but only committed. The transaction
manager heuristically determines the order that resources are driven to
achieve last-agent optimization. The histogram is kept related to
context, based on runtime and applications context to ensure that usage
patterns by context are optimized without the need for the installation
to know any usage patterns.