[23기_최우혁] 성능최적화 미션 제출합니다.#67
Open
whc9999 wants to merge 2 commits into
Open
Conversation
- 영화 목록, 상영 일정, 매점 주문/재고, 영화 이벤트 조회에 인덱스 추가 - Aiven MySQL EXPLAIN 결과를 README에 정리 - 인덱스 적용 전후 실행 계획 비교 스크린샷 추가 - 트랜잭션 전파 속성과 현재 예매/결제 트랜잭션 구조 분석 정리
[Feat] 데이터베이스 인덱스 기반 조회 성능 최적화
shinae1023
reviewed
May 26, 2026
shinae1023
left a comment
There was a problem hiding this comment.
그동안 과제하느라 수고 많으셨습니다 ㅜㅜ
세오스 끝나지망~~
|
|
||
| ### EXPLAIN 비교 결과 | ||
|
|
||
| 실제 Aiven MySQL에 인덱스를 생성한 뒤 DataGrip에서 `EXPLAIN` 결과를 비교했다. 외래키 컬럼으로 시작하는 인덱스는 MySQL이 외래키 검사용 인덱스로도 사용하기 때문에 `DROP INDEX`가 제한되었다. 그래서 실제 인덱스를 삭제하지 않고 `IGNORE INDEX`와 `USE INDEX`로 인덱스 사용 전/후 실행 계획을 비교했다. |
There was a problem hiding this comment.
오 이부분은 몰랏는데 인덱스 적용후에도 이렇게 비교할 수 있네여 👍🏻
| | 인덱스 미사용 | `ALL` | `null` | `Using where` | 전체 주문 테이블을 스캔한 뒤 조건 필터링 | | ||
| | 인덱스 사용 | `ref` | `idx_food_orders_user_status` | `Using index condition` | `user_id`, `status` 복합 인덱스로 대상 주문 탐색 | | ||
|
|
||
|  |
|
|
||
| ## 6. 한계와 보완점 | ||
|
|
||
| - 이번 적용은 JPA 엔티티의 인덱스 메타데이터 추가 방식이다. 운영 DB에서 `ddl-auto`를 사용하지 않는다면 별도 마이그레이션 SQL이 필요하다. |
There was a problem hiding this comment.
한계와 보완점까지 남겨주셔서 어떤 부분을 개선할 수 있는지 저도 더 찾아봐야겠다는 생각이 들었어요!
별도 마이그레이션은 한 번 저희 프로젝트에 적용해봅시다 ^.^
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.