The PolarDB console reports physical cluster storage, while information_schema.tables mainly estimates logical table and index data. The difference can include logs, temporary files, system files and allocated but reusable table space. Measure both views before trying to reclaim anything.
Last updated: November 21, 2026.
SELECT
ROUND(SUM(data_length + index_length) / 1024 / 1024 / 1024, 2)
AS logical_data_and_indexes_gb,
ROUND(SUM(data_free) / 1024 / 1024 / 1024, 2)
AS reported_reusable_space_gb
FROM information_schema.tables
WHERE table_schema NOT IN ('information_schema', 'mysql', 'performance_schema', 'sys');This query is a table-level estimate, not a replacement for the console total. Refresh table statistics before comparing results, and use PolarDB Storage Analysis for the physical view and per-table fragmentation.
What the console includes
A current PolarDB storage question reports a large gap between the console and a table-size query. Alibaba Cloud’s Storage Analysis documentation says the SQL result is logical size, while the console uses physical files. Its storage-management guide divides usage into data, log, temporary and system files.
Logs can include redo, undo and optional binary logs. Sorts, joins and large transactions can create temporary files. The data dictionary, transaction metadata and doublewrite buffer consume system space. If the table recycle bin is enabled, dropped objects can also remain in cluster storage until their retention period expires.
Find the component before reclaiming space
Open Diagnostics and Optimization, then Storage Analysis. Compare physical file size, fragmentation and the cluster metrics for data, logs, temporary files and system files. Statistics derived from information_schema.tables can be cached; Alibaba documents information_schema_stats_expiry and ANALYZE TABLE as ways to refresh those estimates.
Do not run OPTIMIZE TABLE across the cluster merely because totals differ. Deleted rows often leave space reusable by the same table without shrinking its physical file, and a rebuild temporarily needs additional storage. Rebuild only tables with meaningful fragmentation during an appropriate maintenance window. Adjust log retention through supported PolarDB settings, investigate long transactions or disk-spilling queries, and allow time for the console to reflect cleanup.