PolarDB for MySQL integrates features of Database Autonomy Service (DAS) in its one-click diagnostics. You can use storage analysis to view the storage usage overview, estimated remaining storage days, per-table storage usage, storage fragmentation, and storage exceptions of a cluster.
Precautions
-
Storage analysis supports up to 20,000 tables.
-
On the Data Space tab, all statistics except physical file size are derived from the
information_schema.tablestable and may not be up to date. -
After you run the
OPTIMIZE TABLEstatement, the fragmentation percentage of the target table is not immediately updated.The update time is determined by the
information_schema_stats_expiryparameter (unit: seconds), which controls the expiration time of cached statistics. The default value is 86400 seconds, which is 24 hours.You can adjust this parameter or manually run the
ANALYZE TABLEstatement to view the latest fragmentation information.
Procedure
- Log on to the PolarDB console.
-
In the upper-left corner, select the region where the cluster is deployed.
On the Clusters page, click the ID of the target cluster.
In the left-side navigation pane, choose .
-
Click the Storage Analysis tab.

-
On the Storage Analysis page, you can view the following information.
-
Click the Space Overview tab to view the storage usage overview and storage usage trends of databases and tables.

-
Click the Data Space tab to view the storage usage of each database and table. Click a table name to view the fields and indexes of the table.

-
FAQ
Q: Why does the database storage size returned by a SQL query differ from the storage usage shown in the console?
A: The size returned by a SQL query (for example, a query on information_schema.tables) is the logical size of the database. The Storage Analysis page in the console shows the physical storage space calculated from the file system perspective, which includes data files, logs, and all other storage consumption. The two values may differ. Use the value shown on the Storage Analysis page as the actual storage usage.