Skip to content

[23기_최우혁] 성능최적화 미션 제출합니다.#67

Open
whc9999 wants to merge 2 commits into
CEOS-Developers:whc9999from
whc9999:main
Open

[23기_최우혁] 성능최적화 미션 제출합니다.#67
whc9999 wants to merge 2 commits into
CEOS-Developers:whc9999from
whc9999:main

Conversation

@whc9999

@whc9999 whc9999 commented May 22, 2026

Copy link
Copy Markdown

No description provided.

whc9999 and others added 2 commits May 23, 2026 02:48
- 영화 목록, 상영 일정, 매점 주문/재고, 영화 이벤트 조회에 인덱스 추가
- Aiven MySQL EXPLAIN 결과를 README에 정리
- 인덱스 적용 전후 실행 계획 비교 스크린샷 추가
- 트랜잭션 전파 속성과 현재 예매/결제 트랜잭션 구조 분석 정리
[Feat] 데이터베이스 인덱스 기반 조회 성능 최적화

@shinae1023 shinae1023 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그동안 과제하느라 수고 많으셨습니다 ㅜㅜ
세오스 끝나지망~~

Comment thread README.md

### EXPLAIN 비교 결과

실제 Aiven MySQL에 인덱스를 생성한 뒤 DataGrip에서 `EXPLAIN` 결과를 비교했다. 외래키 컬럼으로 시작하는 인덱스는 MySQL이 외래키 검사용 인덱스로도 사용하기 때문에 `DROP INDEX`가 제한되었다. 그래서 실제 인덱스를 삭제하지 않고 `IGNORE INDEX`와 `USE INDEX`로 인덱스 사용 전/후 실행 계획을 비교했다.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 이부분은 몰랏는데 인덱스 적용후에도 이렇게 비교할 수 있네여 👍🏻

Comment thread README.md
| 인덱스 미사용 | `ALL` | `null` | `Using where` | 전체 주문 테이블을 스캔한 뒤 조건 필터링 |
| 인덱스 사용 | `ref` | `idx_food_orders_user_status` | `Using index condition` | `user_id`, `status` 복합 인덱스로 대상 주문 탐색 |

![food_orders 인덱스 미사용](assets/week8-db-optimization/food-orders-before.png)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

비교 결과까지 사진으로 남겨주셔서 이해하기 편했습니다

Comment thread README.md

## 6. 한계와 보완점

- 이번 적용은 JPA 엔티티의 인덱스 메타데이터 추가 방식이다. 운영 DB에서 `ddl-auto`를 사용하지 않는다면 별도 마이그레이션 SQL이 필요하다.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

한계와 보완점까지 남겨주셔서 어떤 부분을 개선할 수 있는지 저도 더 찾아봐야겠다는 생각이 들었어요!
별도 마이그레이션은 한 번 저희 프로젝트에 적용해봅시다 ^.^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants