当前位置:网站首页>查数据库实际数据增长情况
查数据库实际数据增长情况
2022-07-24 16:48:00 【51CTO】
应用场景:最近遇到客户想知道数据库最近一年以来实际数据的增长量,当时只统计了数据文件的增长的情况,但作为DBA都很清楚,通过查看数据文件的增长情况是不够严谨的, 但当时笔者并没有确认到更合适的sql语句. 所以通过以下测试来验证解决这个问题.
以下语句适用于12c:
笔者使用的数据库为oracle 19.14,表test为cdb环境下sys用户新建的测试表,表空间为system,将其增加4049m.
通过以上查询语句在pl sql中执行,可以看到TS_USED_MB从1002.94m增加到5051.88m,数据在整数位吻合.

备注:对于数据增长后,又执行rollback,显示的数据量并不会再减少.通过这种方法可以显示出每个表空间的增长情况,然后通过简单的运算就可以估计出数据库实际数据的增长情况.
以下验证10g和11g的sql语句:
此处使用的数据库为oracle 11.2.0.4
验证:
将T1表由4m增加到485m.
通过以上sql查询的结果,我们可以看到表空间增加了481m,数据吻合.
注意:此处也一样,对于执行rollback的操作,数据量的显示并不会减少.

参考网址:https://www.cnblogs.com/ataoxz/p/14144218.html
边栏推荐
- Axi protocol (3): handshake mechanism and implementation details of Axi architecture
- 小端格式和大端格式(Little-Endian&Big-Endian)
- 我们为什么要推出Getaverse?
- Jing Wei PS tutorial: basic part a
- [zero basis] fully understand webgl (VIII)
- IP第十三天笔记
- 1184. 公交站间的距离
- JUC源码学习笔记3——AQS等待队列和CyclicBarrier,BlockingQueue
- Notebook computer purchase guide (specific brand and model are not recommended)
- Meeting OA project progress (II)
猜你喜欢

Long awaited full platform support - Open Source im project uniapp update of openim

会议OA项目进度(二)

EF LINQ Miscellany

CPU comparison

Jing Wei PS tutorial: basic part a

QT embed Notepad under win10

Summary of experience in using.Net test framework xUnit, mstest, specflow

Envi grid resampling

ArcGIS layer annotation display

剑指 Offer 22. 链表中倒数第k个节点
随机推荐
【时序逻辑电路】——计数器
The differences of several deletions in SQL
[leetcode]38. counting - problem solving (execution time beat 91%, memory consumption beat 97%)
Problems encountered in upgrading chrome to version 80 - solutions to system login failure
ZCMU--5083: ly的数对(C语言)
15. ARM embedded system: how to debug single board with PC
thinkphp3.2.5无法跳转到外部链接
Unity camera free movement control
【机器学习基础】——另一个视角解释SVM
SS-Paper【1】:Fully Convolutional Networks for Semantic Segmentation
AMD锐龙7000预计9月15日上市 3D缓存版还要再等等
Template method mode
Using native JS to realize magnifying glass function
Codeforces round 690 (Div. 3) B. last year's substring conventional solution
Microsoft Visio professional 2013 cannot be opened or uninstalled. Solution
Axi protocol (3): handshake mechanism and implementation details of Axi architecture
EF combined with sqlbulkcopy batch insert data
双亲委派机制
You really should go to the factory to move bricks!
[leetcode]75. color classification - problem solving (execution time beat 90%, memory consumption beat 78%)