일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 메가바이트스쿨
- MariaDB
- Layer 2
- MegabyteSchool
- dns forward
- 내일배움카드
- PV
- ssh tunneling
- RDB
- 127.0.0.53
- linux dns
- L2 통작
- k8s
- systemd-resolved
- 개발자취업부트캠프
- PVC
- 패스트캠퍼스
- linux domain
- reclaim
- Spring boot
- DNS
- ARP
- CoreDNS
- L2 통신
- 국비지원교육
- Today
- Total
hoonii2
[DB] mysql 대용량 Data index 를 활용한 쿼리 성능 개선 본문
1. 개요
대용량 Data 가 저장된 상황에서 Index 를 잘 활용하면 성능을 개선할 수 있다는 얘기를 듣고 실제로 성능 개선이 가능한 지 테스트하고 결과를 공유하고자 합니다.
2. 대용량 Data 구성
https://github.com/datacharmer/test_db
GitHub - datacharmer/test_db: A sample MySQL database with an integrated test suite, used to test your applications and database
A sample MySQL database with an integrated test suite, used to test your applications and database servers - GitHub - datacharmer/test_db: A sample MySQL database with an integrated test suite, use...
github.com
위 공유 데이터를 활용하여 zip 파일을 다운로드받고 'mysql -u root -p < employee.sql' 로 대용량 데이터를 구성했습니다.
300024 의 데이터가 있는 employees table 을 활용했고 필드 구성은 아래와 같습니다.
3. Index 없이 쿼리 결과 확인
대략 0.09 ~ 0.15 sec 정도로 테스트 되었습니다.
4. index 추가 후 테스트 결과 확인
5. 참고 내용
아래 블로그에 Index 관련 내용이 자세하게 정리되어있어 도움이 많이 되었습니다.