Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

불필요하게 join을 활용하는 조회 로직을 개선한다. #725

Closed
2 tasks
hyeonic opened this issue Oct 6, 2022 · 1 comment
Closed
2 tasks
Assignees
Labels
backend 백엔드 refactor 리팩터링

Comments

@hyeonic
Copy link
Collaborator

hyeonic commented Oct 6, 2022

🤷 구현할 기능

불필요하게 join을 활용하는 조회 로직을 개선한다.

🔨 상세 작업 내용

  • 불필요하게 join을 활용하는 조회 로직 탐색
  • 개선

📄 참고 사항

⏰ 예상 소요 기간

3시간

@hyeonic hyeonic added backend 백엔드 refactor 리팩터링 labels Oct 6, 2022
@hyeonic hyeonic added this to the 스프린트 11 milestone Oct 6, 2022
@hyeonic hyeonic self-assigned this Oct 6, 2022
@hyeonic
Copy link
Collaborator Author

hyeonic commented Oct 7, 2022

Optional<OAuthToken> findByMemberId(final Long memberId);

개선 전

Hibernate: 
    select
        oauthtoken0_.id as id1_4_,
        oauthtoken0_.created_at as created_2_4_,
        oauthtoken0_.updated_at as updated_3_4_,
        oauthtoken0_.members_id as members_5_4_,
        oauthtoken0_.refresh_token as refresh_4_4_ 
    from
        oauth_tokens oauthtoken0_ 
    left outer join
        members member1_ 
            on oauthtoken0_.members_id=member1_.id 
    where
        member1_.id=?

개선 후

Hibernate: 
    select
        oauthtoken0_.id as id1_4_,
        oauthtoken0_.created_at as created_2_4_,
        oauthtoken0_.updated_at as updated_3_4_,
        oauthtoken0_.members_id as members_5_4_,
        oauthtoken0_.refresh_token as refresh_4_4_ 
    from
        oauth_tokens oauthtoken0_ 
    where
        oauthtoken0_.members_id=?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend 백엔드 refactor 리팩터링
Projects
None yet
Development

No branches or pull requests

1 participant