Contents

Views 664 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;


?

  1. [mac] VirtualBox 실행 스크립트와 bash_profile 설정

  2. [linux] wget 명령 사용 예제

  3. [linux] The Ultimate Wget Download Guide With 15 Awesome Examples

  4. [sh] 쉘스크립트 if 비교 연산

  5. [sh] html 안에 있는 img 다운 받는 쉘 스크립트

  6. [ios] Start developing your navigation app for CarPlay without enrollment

  7. Configure Postfix to Use Gmail SMTP on Ubuntu 18.04

  8. RPA란? 어디에 어떻게 쓰이고 누가 만드나?

  9. [php] 3 Ways to Detect Mobile or Desktop in PHP

  10. 자주 쓰는 Docker 명령어 alias

  11. [python][django] request.cookie 읽어오기 ㅋㅋㅋ (쓰기)

  12. SSH Passwordless Login Using SSH Keygen in 5 Easy Steps

Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 98 Next
/ 98