Search
1️⃣

OfferingRepository

최종 인덱스

meeting_date, is_deleted, offering_status is_deleted, id, discount_rate offering_status, title, meeting_address
SQL
복사

1. findByMeetingDateAndOfferingStatusNot

결론: meeting_date, is_deleted, offering_status
카디널리티 높은 필드의 순서로 탐색한 후 작업 범위를 결정하지 않는 필드를 탐색한다. 또한 다른 인덱스와 공존할 경우 MySQL 옵티마이저가 선택하는 인덱스이다.
비교 결과
백로그

2. findJoinableOfferingsWithKeyword

참여 가능한 필터 적용 검색 결과
결론: 추가 X
이유: id로 필터링과 정렬을 진행하므로 PK만으로 성능 개선 충분
비교 결과
백로그

3. findHighDiscountOfferingsWithKeyword

높은 할인율
결론: is_deleted, id, discount_rate
비교 결과
백로그1
백로그2

4. findImminentOfferingsWithKeyword

결론: offering_status, title, meeting_address
비교 결과

5. findRecentOfferingsWithKeyword

결론: 추가 X
이유: id로 필터링과 정렬을 진행하므로 PK만으로 성능 개선 충분
비교 결과

6. findCommentRoomsByMember

결론: 추가 X
이유: id로 필터링과 정렬을 진행하므로 PK만으로 성능 개선 충분
chongdae> SELECT * FROM offering as o JOIN offering_member as om ON o.id = om.offering_id WHERE om.member_id = 500 [2024-09-26 13:38:10] 500 rows retrieved starting from 1 in 141 ms (execution: 38 ms, fetching: 103 ms)
SQL
복사

7. findById

결론: 추가 X
이유: id로 필터링을 진행하므로 PK만으로 성능 개선 충분
chongdae> SELECT * FROM offering as o WHERE o.id = 927 [2024-09-27 09:59:08] 1 row retrieved starting from 1 in 59 ms (execution: 33 ms, fetching: 26 ms)
SQL
복사