티스토리 뷰
Database별 Size 확인 Query
SELECT
count(*) NUM_OF_TABLE,
table_schema,concat(round(sum(table_rows)/1000000,2),'M') rows,
concat(round(sum(data_length)/(1024*1024*1024),2),'G') DATA,
concat(round(sum(index_length)/(1024*1024*1024),2),'G') idx,
concat(round(sum(data_length+index_length)/(1024*1024*1024),2),'G') total_size,
round(sum(index_length)/sum(data_length),2) idxfrac
FROM information_schema.TABLES
GROUP BY table_schema
ORDER BY sum(data_length+index_length) DESC LIMIT 10;
파일시스템 용량부족의 압박이 있어, 대체 어떤 Database가 많이 사용하고 있는지 확인하려고 참조한 Query
'기술' 카테고리의 다른 글
[RHEL] SSH 세션 유지시간 설정 (0) | 2014.08.28 |
---|---|
[MySQL] Table 별 Size 확인 Query (0) | 2014.07.31 |
[MySQL] DB/User 생성 및 권한 추가 (0) | 2014.07.18 |
[MySQL][Workbench] mysql의 \G 옵션을 MySQL Workbench에서 사용하려면 (0) | 2014.06.25 |
[MySQL] Ignoring query to other database (4) | 2014.05.19 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- database
- MySQL
- dbms
- OSS
- cycle
- error
- tip
- centos
- Windows
- Bit
- storage
- cpu
- 태그를 입력해 주세요.
- rhel
- NTP
- OS
- version
- date
- Linux
- hostname
- Size
- Solaris
- db
- yum
- aix
- Redhat
- centos7
- It
- query
- Java
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함
링크