Contents

Views 666 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 설정

    Date2020.07.08 CategorySystem/OS Byhooni Views975
    Read More
  2. [linux] wget 명령 사용 예제

    Date2020.05.26 CategorySystem/OS Byhooni Views1450
    Read More
  3. [linux] The Ultimate Wget Download Guide With 15 Awesome Examples

    Date2020.05.26 CategorySystem/OS Byhooni Views812
    Read More
  4. [sh] 쉘스크립트 if 비교 연산

    Date2020.05.26 CategoryDevelop Byhooni Views60673
    Read More
  5. [sh] html 안에 있는 img 다운 받는 쉘 스크립트

    Date2020.05.26 CategoryDevelop Byhooni Views645
    Read More
  6. [ios] Start developing your navigation app for CarPlay without enrollment

    Date2020.02.22 CategoryDevelop Byhooni Views124836
    Read More
  7. Configure Postfix to Use Gmail SMTP on Ubuntu 18.04

    Date2020.02.07 CategorySystem/OS Byhooni Views1258
    Read More
  8. RPA란? 어디에 어떻게 쓰이고 누가 만드나?

    Date2020.01.28 CategorySystem/OS Byhooni Views1368
    Read More
  9. [php] 3 Ways to Detect Mobile or Desktop in PHP

    Date2020.01.28 CategoryDevelop Byhooni Views3730
    Read More
  10. 자주 쓰는 Docker 명령어 alias

    Date2020.01.10 CategoryDevelop Byhooni Views269864
    Read More
  11. [python][django] request.cookie 읽어오기 ㅋㅋㅋ (쓰기)

    Date2019.12.06 CategoryDevelop Byhooni Views1696
    Read More
  12. SSH Passwordless Login Using SSH Keygen in 5 Easy Steps

    Date2019.11.22 CategorySystem/OS Byhooni Views1397
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 98 Next
/ 98