Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

收集表+索引的数据大小 #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

yamada95
Copy link

执行SELECT (SUM(DATA_LENGTH)+SUM(INDEX_LENGTH)) AS data_size FROM INFORMATION_SCHEMA.TABLES
来收集数据总量大小,执行时间视情况可能比较长。

@laiwei
Copy link
Member

laiwei commented Jun 16, 2015

谢谢

这个select查询,资源消耗不可控,merge后是否会对高峰期线上的业务造成影响?

@yamada95
Copy link
Author

@laiwei 的确不可控,我觉得主要看有多少张表。
我们数据库是用阿里云的RDS,因为不能直接直接监控主机的磁盘使用,所以就打算这么来监控数据的增量或者大概估计数据在磁盘上的占用量。
我们数据库除自带表(performance_schema,information_schema,mysql)外有196张表,查询时间是0.03sec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants