On the CloudBlue Commerce installations with a big number of orders, the number of records in the database related to these orders can be reduced by archiving old orders.


CloudBlue Commerce allows you to archive all orders with a specific seller that were placed before a certain date. However, if you archive the orders for the first time, we strongly recommend doing it month by month, starting from the month when the first order was placed.

To archive orders, complete the following steps.


  1. Log in to the CloudBlue Commerce control panel and switch to Billing.
  2. Go to Operations > Orders.
  3. Sort the orders by date and check the date when the first order was placed. 
  4. Calculate the number of months from that date to the current date.
  5. Connect to the BSS database and execute the attached SQL queries to get the necessary statistics: table_stats.sql and index_stats.sql.
  6. Send the obtained results to support.
  7. In the CloudBlue Commerce billing control panel, go to Settings > Order Processing > Order Processing Setup and click Edit.
  8. Reduce the number of months from the first order by 1 and enter the result in the Orders Archive Interval field.
  9. Save the changes.
  10. Go to Operations > Orders.
  11. Click Bulk Archive to archive the orders of the current account's customers.
    Note: If you have a big number of resellers and you need to archive orders for all of them, contact support to get assistance.
  12. After the orders are archived, repeat steps 5 - 11 of these instructions. You should stop when Orders Archive Interval reaches the number of months for which you want to keep the orders. For example, if you want to keep all orders for the year to date, stop at 12.

After you archive all necessary orders, you can perform a full vacuum of the database.