'테이블 용량'에 해당되는 글 1건

  1. 2015.05.07 mysql table 용량 보는 쿼리
프로그래밍 2015. 5. 7. 00:17
SELECT 
concat(table_schema,'.',table_name),   
concat(round(table_rows/1000000,2),'M') rows,   
concat(round(data_length/(1024*1024*1024),2),'G') DATA,   
concat(round(index_length/(1024*1024*1024),2),'G') idx,   
concat(round((data_length+index_length)/(1024*1024*1024),2),'G') total_size,   
round(index_length/data_length,2) idxfrac    
FROM information_schema.TABLES  
where table_name = '테이블명' ;

select table_schema "databases_name", SUM(data_length + index_length) / 1024 / 1024 "size(MB)" from information_schema.TABLES;

'프로그래밍' 카테고리의 다른 글

mysql 대소문자 비교 컬럼  (0) 2015.09.02
맥에 java 설치  (0) 2015.06.12
[maven] jar 를 Local Repository 에 추가하기  (0) 2015.05.06
maven 프로젝트생성하기  (0) 2015.05.06
저장 검색의 복잡도  (0) 2015.04.08
//