If you are storing the order in the database then the "Store Cart Summary in Database" server behavior has a "Save As" value that specifies the Session variable name that stores the OrderID from the database. This will be a much smaller number and can be replaced in the receipt pages and email.