有时我们想知道数据库创建以来数据文件的空间增长情况,可以以下语句初略统计:
SELECT TO_CHAR(creation_time, 'RRRR-MM') "month",SUM(bytes) growth
FROM sys.v_$datafile
GROUP BY TO_CHAR(creation_time, 'RRRR-MM')
ORDER BY TO_CHAR(creation_time, 'RRRR-MM');
month GROWTH
-------------- ----------
2019-05 2076180480
2022-04 20971520
2022-07 38797312