Database Autonomy Service (DAS) provides the storage analysis feature. You can use this feature to view the storage usage of a database instance and the expected number of days after which the remaining storage may be insufficient. You can also view information about the storage usage, fragments, and anomaly diagnosis results of a tablespace in a database. This topic provides an example to describe how to use the storage analysis feature. In this example, an ApsaraDB RDS for MySQL instance is used.

Prerequisites

A database instance is connected to DAS. Make sure that the database instance is one of the following types:
  • ApsaraDB RDS for MySQL
  • Self-managed MySQL
  • ApsaraDB for MongoDB
  • Self-managed MongoDB
  • ApsaraDB RDS for PostgreSQL
  • PolarDB for MySQL
  • PolarDB for PostgreSQL
  • PolarDB for Oracle
  • PolarDB-X 2.0

View global storage usage

If you use DAS to manage multiple database instances of the same type, you can view the storage usage of the database instances on the Global Storage Usage page. This helps you find the database instance that has the highest storage usage.

Note Global Storage Usage supports the following database instances:
  • ApsaraDB RDS for MySQL instances
  • Self-managed MySQL databases
  • ApsaraDB for MongoDB instances
  • Self-managed MongoDB databases
  1. Log on to the DAS console.
  2. In the left-side navigation pane, click Storage Analysis. The Global Storage Usage page appears. You can view information about the storage usage of all database instances of the same type.

    Self-managed database instances that are connected to DAS by using the Direct Access or Centralized DBGateway method are not displayed on the Global Storage Usage page because DAS does not collect their storage data.

    Note

    Self-managed databases can be connected to DAS by using one of the following methods. For more information about how to connect self-managed databases to DAS, see Access instances.

    • Direct Access: Self-managed databases are directly connected to DAS.
    • Centralized DBGateway: Self-managed databases are connected to DAS by using DBGateway in centralized mode.

View the storage analysis results of a single database instance

  1. Log on to the DAS console.
  2. In the left-side navigation pane, click Instance Monitoring.
  3. On the page that appears, click the ID of the database instance that you want to manage. The instance details page appears.
  4. In the left-side navigation pane, click Storage Analysis.
  5. On the Storage Overview and Data Space tabs of the Storage Analysis page, you can view the storage usage of the database instance.
    Tab Section Description
    Storage Overview Storage View Exception, Avg Daily Increase in Last Week, Available Days of Storage, and Used Storage information.
    Exceptions View the exception information of tables or collections in the database instance. If the automatic space optimization feature is enabled for the database instance, you can also view the space optimization history.
    DAS can identify the following exceptions:
    • Potential overflows of auto-increment primary keys: DAS can automatically identify potential overflows of auto-increment primary keys in ApsaraDB RDS for MySQL instances and PolarDB for MySQL clusters.
    • Duplicate indexes: DAS can automatically identify duplicate indexes in ApsaraDB RDS for MySQL instances and PolarDB for MySQL clusters.
    • Tablespace fragments: For more information, see Automatic tablespace fragment recycling.
    Storage Trend View the trend of Data Space, Used Storage, Log Space, and Temporary Space over the last week.
    Tablespaces View information such as the storage usage of each table in the database instance. Click the name of a table to view the fields and indexes of the table.
    Data Space View the storage usage of each database in the database instance and the usage of tablespaces in the database.

    Click the name of a table to view the fields and indexes of the table.