Contents

Views 656 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
1149 Etc IPR 특허 관련 secret hooni 2015.04.28 0
1148 System/OS iptime 공유기 해킹 기술문서 4 file hooni 2015.01.01 1941
1147 Etc ISMS 인증기준 – 정보보호대책 (시스템개발보안) file hooni 2016.12.01 1299
1146 Etc IT감사 기법 시험 file hooni 2017.06.14 1416
1145 Develop JSON, BSON 변환 file hooni 2013.04.23 11814
1144 Develop Laravel 5 Failed opening required bootstrap/../vendor/autoload.php hooni 2018.01.24 1652
1143 System/OS Mac OS X - Apache+PHP+MySQL 환경 서버 hooni 2013.04.25 31627
1142 Develop Mac OS 에 Jenkins 설치하기 (Homebrew) 2 file hooni 2017.03.15 8091
1141 Develop macOS에 node, npm 설치하기 (homebrew) file hooni 2021.11.06 1139
1140 System/OS Mac에서 Node.js 설치하기 file hooni 2018.09.28 4185
1139 System/OS NAT와 DHCP에 대한 간단한 설명 hooni 2013.04.23 18328
1138 Algorithm OCB5 Injection 앗싸뵹! ㅋㅋ file hooni 2014.07.01 796
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 98 Next
/ 98