반응형
Notice
Recent Posts
Recent Comments
Link
IT Japan
MySQL 튜닝 본문
반응형
쿼리 분석
MySQL의 EXPLAIN을 철저해설
show profile로 실행시간을 본다
↑
서버분석
MySQL의 튜닝
↑
설정값을 확인
mysql> show variables;
↑
통계정보를 취득
정량적인 정보수집의 단계
mysql> show global status; (5.0.2이상의 경우)
mysql> show status; (5.0.2 미만의 경우)
테이블이 레코드수, 데이터사이즈, 인덱스 사이즈등을 조사
select table_name, engine,
table_rows as tbl_rows,
avg_row_length as rlen,
floor((data_length+index_length)/1024/1024) as allMB,
floor((data_length)/1024/1024) as dMB,
floor((index_length)/1024/1024) as iMB
from information_schema.tables
where table_schema=database()
order by (data_length+index_length) desc;
INFORMATION_SCHEMA 데이터베이스
↑
Slow- Query로그를 체크
↑
접속상태를 확인
$ mysqladmin -p extended-status | grep -E 'Max|Threads'
Enter password:
| Max_used_connections | 51 |
| Threads_cached | 4 |
| Threads_connected | 21 |
| Threads_created | 18015 |
| Threads_running | 11 |
반응형
'MySQL' 카테고리의 다른 글
MySQL StatList (0) | 2016.03.21 |
---|---|
MySQL 업그레이드 (0) | 2015.01.13 |
MySQL기동시 다음과 같은 에러메세지가 나올경우 (0) | 2015.01.13 |
OPTIMIZE TABLE (0) | 2015.01.13 |
MySQL Connectors and APIs (0) | 2014.11.17 |
Comments