Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- group_concat 구분자
- 자바스크립트비밀번호검증
- modsecurity 설치
- usb efi 시스템 파티션 삭제
- VS Code 서버설치
- bootstrap
- mod_security2 설치
- apple push notification service (apns) is changing
- bootstrap modal
- (using password: YES)" when trying to connect
- PHP 정규식 예제
- httpd.conf 보안 설정
- postfix 설치
- 윈도우 mod_security2
- 비밀번호정규식
- php 이미지 url 검증 함수
- javascript
- 숫자 3자리(천단위) 마다 콤마 찍기
- mariadb upgrade
- 파라미터 & 오류
- sha-2 root
- wsl2 우분투에 docker 설치
- usb 삭제
- thumbnail 클래스
- html pdf 변환
- 비밀번호검증정규식
- 윈도우 환경 아파치 mod_security2 설치
- 유튜브 플레이 리스트 저장
- php 배열제거
- 아파치 웹 서버의 정보 숨기기
Archives
- Today
- Total
투덜이 개발자
[MySQL] 데이터베이스 및 테이블별 용량 본문
반응형
데이터베이스별, 테이블별, 전체 용량을 아래 쿼리를 통해 확인 할 수 있다.
1. 데이터베이스별 용량 (Database Size) 조회
SELECT table_schema AS 'DatabaseName',
ROUND(SUM(data_length+index_length)/1024/1024, 1) AS 'Size(MB)'
FROM information_schema.tables
GROUP BY table_schema
ORDER BY 2 DESC;
2. 전체 용량 (Total Size) 조회
SELECT ROUND(SUM(data_length+index_length)/1024/1024, 1) AS 'Used(MB)',
ROUND(SUM(data_free)/1024/1024, 1) AS 'Free(MB)'
FROM information_schema.tables;
3. 테이블별 용량 (Table Size) 조회
SELECT table_name AS 'TableName',
ROUND(SUM(data_length+index_length)/(1024*1024), 2) AS 'All(MB)',
ROUND(data_length/(1024*1024), 2) AS 'Data(MB)',
ROUND(index_length/(1024*1024), 2) AS 'Index(MB)'
FROM information_schema.tables
GROUP BY table_name
ORDER BY data_length DESC;
[MySQL] 데이터베이스 및 테이블별 용량 (Size by databases and tables) 조회
데이터베이스별, 테이블별, 전체 용량을 아래 쿼리를 통해 확인 할 수 있다. 1. 데이터베이스별 용량 (Database Size) 조회 SELECT table_schema AS 'DatabaseName', ROUND(SUM(data_length+index_length)/1024/1..
ryean.tistory.com
반응형
'DataBase > MySQL' 카테고리의 다른 글
| [MySQL] JOIN 걸어서 업데이트(UPDATE) 하기 (0) | 2022.07.14 |
|---|---|
| [Mysql] 데이터 베이스 삭제 에러 (0) | 2022.07.07 |
| my.cnf 위치 찾기 (0) | 2022.02.21 |
| mysql-bin(binary log)파일 정리 및 삭제 주기 설정 (0) | 2022.02.21 |
| mysql DB 테이블 손상 확인 및 복구방법 (0) | 2022.02.16 |