• Data Warehouse Service

  1. Help Center
  2. Data Warehouse Service
  3. User Guide
  4. FAQs
  5. General FAQs
  6. How Can I Clear and Reclaim the Storage Space?

How Can I Clear and Reclaim the Storage Space?

After you delete data stored in DWS data warehouses, dirty data may be generated possibly because the disk space is not released. This results in disk space waste and deteriorates snapshot creation and restoration performance. The following describes the impact on the system and subsequent operation to clear the disk space:

The impact on the system is as follows:

  • Unnecessary data needs to be deleted to release the storage space.
  • Frequent read and write operations may affect proper database use. Therefore, it is good practice to clear and reclaim the storage space when not in peak hours.
  • The data clearing time depends on the data stored in the database.

Perform the following steps to clear and reclaim the storage space:

  1. Connect to the database. For details, see section Connecting to a Cluster.
  2. Run the following command to clear and reclaim the storage space:


    By default, tables of which the current user has the permission are deleted. For tables that the current user does not have permissions, skip reclamation.

    The storage space is cleared when the following information is displayed:


    The statistical information will be lost if you use the Full parameter. To collect the statistics, add keyword ANALYZE ahead of the command. For example, run the VACUUM FULL ANALYZE; command. For more information about VACUUM, see VACUUM in the Data Warehouse Service Database Developer Guide.