查看数据库的空间增长趋势

发布时间:2022-08-19 00:00:00

有时我们想知道数据库创建以来数据文件的空间增长情况,可以以下语句初略统计:

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

<<