惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
GRAHAM CLULEY
T
Tenable Blog
Know Your Adversary
Know Your Adversary
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Privacy International News Feed
S
Security Affairs
NISL@THU
NISL@THU
O
OpenAI News
Attack and Defense Labs
Attack and Defense Labs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
Schneier on Security
Schneier on Security
S
SegmentFault 最新的问题
S
Schneier on Security
G
Google Developers Blog
V
V2EX
C
Check Point Blog
U
Unit 42
Google DeepMind News
Google DeepMind News
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
T
The Exploit Database - CXSecurity.com
Recent Announcements
Recent Announcements
M
MIT News - Artificial intelligence
S
Secure Thoughts
博客园 - 司徒正美
Recorded Future
Recorded Future
P
Proofpoint News Feed
Spread Privacy
Spread Privacy
K
Kaspersky official blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
AI
AI
博客园 - 聂微东
N
News and Events Feed by Topic
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
The Hacker News
The Hacker News
The Last Watchdog
The Last Watchdog
Project Zero
Project Zero
W
WeLiveSecurity
博客园 - Franky

博客园 - 人生为卒

CAD缺失字体如何处理 Excel 快速拖动公式的方法 微信小程序隐私审核 微信小程序创建流程 mysql 查询数据库的所有表格字段 CAD二次开发入门:WPF类库 Excel 根据单元格值设置行颜色 cmd安装Windows服务 log4.config C# 检测并重启windows服务,IIS应用池 redis 服务安装 Windows系统下本地MQTT服务器搭建,及开机自启 Navicat设置备份文件存储路径 Windows自动录屏功能 spring中常用注解 Windows系统 nacos 部署 解决不能访问GitHub的问题 Java 打包到部署子工程出错 Java-Maven基础
MySq 表内存占用情况
人生为卒 · 2024-06-26 · via 博客园 - 人生为卒

Mysql查询数据库表内存占用情况,按照表名分组

SELECT   table_schema  AS '数据库名称',table_name AS '数据表名' ,table_rows  AS '数据条数(条)'
,ROUND((data_length + index_length) / 1024/ 1024, 2) AS '数据库大小(MB)',ROUND((data_length + index_length) / 1024/1024/ 1024, 2) AS '数据库大小(GB)'
,create_time  AS '创建时间',update_time  AS '最后更新时间'
 from information_schema.`TABLES`  
 WHERE table_schema='dbname'   -- 数据库名称 
  ORDER BY table_rows desc ;

Mysql查询整个数据库内存占用情况,按照数据库分组

SELECT * from (
SELECT table_schema AS '数据库名称',ROUND(SUM(table_rows ) , 2) AS AllRows,ROUND(SUM(data_length + index_length) / 1024/ 1024, 2) AS '数据库大小(MB)',ROUND(SUM(data_length + index_length) / 1024/1024/ 1024, 2) AS '数据库大小(GB)'
 
 
 from information_schema.`TABLES` 
 
gROUP BY table_schema

) as tt

ORDER BY tt.AllRows DESC