当前位置:网站首页>查数据库实际数据增长情况
查数据库实际数据增长情况
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
边栏推荐
- Codeworks round 693 (Div. 3) C. long jumps problem solution
- [technology] chat room demo of uniapp
- 荣耀CEO赵明:单一厂商很难实现全场景产品覆盖
- "Heaven and the world, self-respect" -- single case mode
- EF combined with sqlbulkcopy batch insert data
- Axi protocol (2): five channels and two transactions of Axi architecture
- Envi5.3 open GF-1 WFV data
- CPU comparison
- [Nanjing Agricultural University] information sharing of postgraduate entrance examination and re examination
- Development dynamics | stonedb 2022 release milestone
猜你喜欢

Axi protocol (3): handshake mechanism and implementation details of Axi architecture

Meeting OA project progress (I)

OS Experiment 5 process switching based on kernel stack switching

Sword finger offer 22. the penultimate node in the linked list

Meeting OA project progress (II)

ARP 入门

EventLoop event loop mechanism

Small end format and big end format (little endian & big endian)

Creation and inheritance of JS class

AXI协议(1):AMBA总线介绍,AXI概念与背景介绍,AXI协议特点与功能
随机推荐
Long awaited full platform support - Open Source im project uniapp update of openim
2019q1 global smartphone shipments: Huawei vivo increased significantly, while Apple plummeted 30.2%!
Win10 download address
Codeforces round 690 (Div. 3) B. last year's substring conventional solution
1184. Distance between bus stops
Analysis of double pointer sliding window method and solution of leetcode related problems
Amd Ruilong 7000 is expected to be available on September 15, and the 3D cache version will have to wait
Codeforces round 690 (Div. 3) C. unique number conventional solution
QT generation connection Library
AXI协议(2):AXI架构的五个通道和两种事务
Qsqldatabase: solution of qmmysql driver not loaded
ARP 入门
The third edition of New Horizon College English reading and Writing Tutorial 4 graduation examination site (units 1,2,3,5,6)
工信安全中心牵头搭建数据流通平台 蚂蚁集团等厂商提供技术支持
Custom types: Enumeration
Small end format and big end format (little endian & big endian)
Concept of IP, classification of IP, IP multiplexing technology
MODIS data WGet Download
MODIS 16 day data monthly / quarterly synthesis
TCP protocol debugging tool tcpengine v1.3.0 tutorial