Table 별 Size 확인 QuerySELECT table_name, table_rows, round(data_length/(1024*1024),2) as 'DATA_SIZE(MB)', round(index_length/(1024*1024),2) as 'INDEX_SIZE(MB)'FROM information_schema.TABLESwhere table_schema = '데이터베이스이름'GROUP BY table_name ORDER BY data_length DESC LIMIT 10; 막상 많이 사용량이 큰 Database를 찾고나니, 어떤 Table이 문제인지 찾고 싶을 때 사용.
Database별 Size 확인 QuerySELECTcount(*) 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) idxfracFROM information_schema.TABLESGROU..
- Total
- Today
- Yesterday
- Redhat
- hostname
- OSS
- Size
- centos7
- OS
- Windows
- Solaris
- version
- dbms
- db
- Bit
- Java
- storage
- cpu
- yum
- cycle
- rhel
- 태그를 입력해 주세요.
- database
- tip
- query
- centos
- aix
- date
- error
- NTP
- It
- Linux
- MySQL
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |