JOIN문 활용 응답속도 개선

배병일 ㅣ 2023. 9. 24. 21:20

기존 Company 상세 조회


- 해당 company 조회 API 요청

- 해당 company의 trainer 조회 API 요청

- 해당 company의 review 조회 API 요청

- review의 경우 enum으로 company와 trainer를 구분하기 때문에 join 불가능

 

<http.response_time> 

 

단위 : ( ms )

 

- median : 15
- p95 : 32.1
- p99 : 55.2

 

개선 Company 상세 조회


- 해당 company 조회 API 요청 시 join을 통해 trainer 불러오도록 수정

<http.response_time>

 

단위 : ( ms )

 

- median : 15
- p95 : 19.1 ( 40.47% 감소 )
- p99 : 34.8 ( 36.94% 감소 )

 

기존 post 상세 조회


- 해당 post 조회 API 요청

- 해당 post 의 comment 조회 API 요청

- 해당 post 의 comment의 userName 조회 API 요청

 

http.response_time

 

단위 : ( ms )

 

- median : 13.9
- p95 : 30.3
- p99 : 44.3

 

개선 post 상세 조회


- 해당 post 조회 API 요청 시 join을 통해 comment , comment의 userName 불러오도록 수정

 

 

http.response_time

 

단위 : ( ms )


- median : 16 ( 15.11% 증가 )
- p95 : 19.9 ( 34.43% 감소 )
- p99 : 34.1 ( 23.05% 감소 )

'DBMS > MYSQL' 카테고리의 다른 글

Unexpected number in JSON at position 110  (0) 2023.09.23