Contents

Views 794 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
333 Develop [c] 간단한 점 이동 샘플 소스코드 hooni 2013.04.23 6583
332 Develop [js] 새로고침(refresh)방법과 다른 페이지 바꾸기.. hooni 2003.04.23 6567
331 Develop [c] 민수형 소스(도메인소켓포함) file hooni 2013.04.23 6549
330 Develop [php] 정규표현식 간단히 정리 hooni 2013.04.23 6510
329 Develop [c] 네트워크 보안 프로그래밍 과제 (Server,Agent,Client) file hooni 2013.04.23 6497
328 Develop [js] 윤동이가 만든 영어 학습(?) 프로그램 file hooni 2013.04.23 6482
327 Develop [c] 메세지 프로그램 (Server - Agent - Client) file hooni 2013.04.23 6481
326 Develop [doc] C언어 문법 설명서 file hooni 2013.04.23 6473
325 Develop [java] 채팅창 처럼2.. swing.. file hooni 2013.04.23 6453
324 Etc 영어. 반드시 외워야 할 영어 숙어 2 file hooni 2016.07.07 6443
323 Develop [c] 다중연결 서버 만들기 #3 - poll() 사용 file hooni 2013.04.23 6371
322 Develop [js] 사진첩에 쓸 내용 - 마우스 오버로 바꾸기 hooni 2013.04.23 6365
Board Pagination Prev 1 ... 66 67 68 69 70 71 72 73 74 75 ... 98 Next
/ 98