Contents

Views 758 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

1. 테이블별 사이즈 확인 (쿼리 시점에 정확한 사이즈는 아니지만, 참고할 만한 데이터임)

SELECT 
    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.TABLES
where table_schema = '데이터베이스이름'
GROUP BY table_name 
ORDER BY data_length DESC 
LIMIT 10;


2. Database 별 사이즈 확인 (쿼리 시점에 정확한 사이즈는 아니지만, 참고할 만한 데이터임)

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;


?

List of Articles
No. Category Subject Author Date Views
1137 Develop OGNL(Object Graph Navigation Language) hooni 2013.04.23 15767
1136 Develop OpenGL 강좌 사이트 모음 hooni 2013.04.23 9658
1135 System/OS OpenSSL로 ROOT CA 생성 및 SSL 인증서 발급하기 hooni 2017.10.28 1596
1134 Develop OPT와 CAS에 대한 자료.. (교수님 메일로 보내드린 자료..) file hooni 2013.04.23 13950
1133 System/OS OSI (Open Systems Interconnection) 개방형 시스템간 상호 접속 file hooni 2013.04.23 10826
1132 System/OS php.ini 설정 안됐을때.. ㅋㅋ hooni 2013.04.23 11682
1131 Algorithm Polynomial time 이란? ㅋㅋ hooni 2013.04.23 22757
1130 System/OS RPA란? 어디에 어떻게 쓰이고 누가 만드나? file hooni 2020.01.28 1480
1129 Etc RSVP 란? file hooni 2017.11.22 1137
1128 Database SQL JOIN 정리 (Inner Join & Outer Join) file hooni 2019.11.22 1911
1127 System/OS SSH Passwordless Login Using SSH Keygen in 5 Easy Steps file hooni 2019.11.22 1518
1126 Develop SVN 명령어 (SVN command) hooni 2014.02.28 12188
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 98 Next
/ 98