After having many deadlocks due to a high order volumne I've applied the these fixes to the core. Some can be found in a Magento forum. Before the fixes we could only process 1 order every 5-10 secs. Updating to Magento 1.8 is currently not an option but in 1-2 months.
Mage_Sales_Model_Abstract::_afterSave
must be removed and replaced with afterCommitCallback
. This is important to move the grid update (of sales_flat_order_grid) out of the transaction.
Rewrite the method of the Mage_CatalogInventory_Model_Observer::reindexQuoteInventory()
to remove the price reindexing from the transaction. That index process will also be fired in event sales_model_service_quote_submit_success
.