当前位置:网站首页>MySQL & Oracle database capacity query
MySQL & Oracle database capacity query
2022-06-11 08:38:00 【R.Jamin Cheng】
1. View the capacity of all databases
select
table_schema as ‘ database ’,
sum(table_rows) as ‘ Record number ’,
sum(truncate(data_length/1024/1024, 2)) as ‘ Data capacity (MB)’,
sum(truncate(index_length/1024/1024, 2)) as ‘ Index capacity (MB)’
from information_schema.tables
group by table_schema
order by sum(data_length) desc, sum(index_length) desc;
2. Check the capacity of all databases
select
table_schema as ‘ database ’,
table_name as ‘ Table name ’,
table_rows as ‘ Record number ’,
truncate(data_length/1024/1024, 2) as ‘ Data capacity (MB)’,
truncate(index_length/1024/1024, 2) as ‘ Index capacity (MB)’
from information_schema.tables
order by data_length desc, index_length desc;
3. View the specified database capacity size
– example : see mysql Library capacity size
select
table_schema as ‘ database ’,
sum(table_rows) as ‘ Record number ’,
sum(truncate(data_length/1024/1024, 2)) as ‘ Data capacity (MB)’,
sum(truncate(index_length/1024/1024, 2)) as ‘ Index capacity (MB)’
from information_schema.tables
where table_schema=‘mysql’;
4. Check the capacity of each table in the specified database
– example : see mysql The capacity of each table in the library
select
table_schema as ‘ database ’,
table_name as ‘ Table name ’,
table_rows as ‘ Record number ’,
truncate(data_length/1024/1024, 2) as ‘ Data capacity (MB)’,
truncate(index_length/1024/1024, 2) as ‘ Index capacity (MB)’
from information_schema.tables
where table_schema=‘mysql’
order by data_length desc, index_length desc;
5. View the row size of the specified database table
– example : see Oracle Number of rows in the library table
SELECT TABLE_NAME,NUM_ROWS FROM ALL_TABLE WHEE OWNER = ‘LIUXM’
PS: Note the name of the owner , Case write
边栏推荐
- Zookepper===>动物管理员系统
- The role of lambdalr in pytorch
- Dameng database startup and shutdown
- torch. meshgrid
- 深度学习入门之pytorch安装
- 并查集是什么?你还在为其烦恼?其实就是一个连通图的问题,理解起来没有那么困难
- 项目实训-克隆门
- Summary of knowledge points of customized ViewGroup - continuously updated
- Bat batch processing separate environment packaging
- Dameng user management
猜你喜欢

qiao-npms:获取npm包下载量

ActiveMQ简单教程,适合初学者,学习笔记yyds
![[cvpr2022] intensive reading of querydet papers](/img/10/a48e2c877946a1b9da71ce6e9546f7.png)
[cvpr2022] intensive reading of querydet papers

Using flying items to manage by objectives, not being a "headless fly" in the workplace

Entity class conversion cannot be reassigned

Qiao NPMS: get the download volume of NPM packages

BFS on tree (tree breathing first search)

Typescript header file usage details

qiao-lerna:lerna辅助工具

How to do a good job in project management? Learning these four steps is enough
随机推荐
Use Jackson's @jsonproperty annotation to add one more field to the property name. Solution to the problem
torch. unbind()
Sign in system design: how to draw the sign in function
Empty difference between postgrepsql and Oracle
B+超强树,带你知晓MySQL的底层是怎样的结构
Entity class conversion cannot be reassigned
Introduction to the principles of linkedblockingqueue, arrayblockingqueue, synchronousqueue, concurrentlinkedqueue and transferqueue
Basic use of typescripy class
Introduction to knowledge atlas -- yedda annotation
Web design and website planning assignment 14 add background music to the video
Web design and website planning assignment 11 game selection form
用飞项进行目标管理,不做职场上的“无头苍蝇”
一些学习记录i=
How to solve the MySQL deadlock problem? Recitation version
Modifying field length in Oracle and postgrepsql
uniapp 插件开发
TRUNC in pytorch_ normal_ principle
[cvpr2022] intensive reading of querydet papers
uniapp关闭/开启/调节系统声音
Layout of code setting constraintlayout_ constraintDimensionRatio