Skip to content

perf: nearby 반경 5000m -> 1000m 축소 (Seq Scan 방지)#126

Merged
johe00123 merged 1 commit into
developfrom
feat/k6-test-fix
Jun 2, 2026
Merged

perf: nearby 반경 5000m -> 1000m 축소 (Seq Scan 방지)#126
johe00123 merged 1 commit into
developfrom
feat/k6-test-fix

Conversation

@docodocod

Copy link
Copy Markdown
Contributor

서울 중심 5km 반경에 전체 매장 56%가 집중되어 플래너가 GIST 인덱스 대신
Seq Scan을 선택. 반경 축소로 매칭 행 수를 줄여 인덱스 활용 유도.

📢 기능 설명

필요시 실행결과 스크린샷 첨부

연결된 issue

연결된 issue를 자동을 닫기 위해 아래 {이슈넘버}를 입력해주세요.

close #{이슈넘버}

✅ 체크리스트

  • PR 제목 규칙 잘 지켰는가?
  • 추가/수정사항을 설명하였는가?
  • 이슈넘버를 적었는가?

서울 중심 5km 반경에 전체 매장 56%가 집중되어 플래너가 GIST 인덱스 대신
Seq Scan을 선택. 반경 축소로 매칭 행 수를 줄여 인덱스 활용 유도.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request reduces the search radius for nearby stores from 5000.0 to 1000.0 meters in StoreService.java. The feedback suggests defining this hardcoded radius value as a class constant to improve code readability and maintainability.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

int limitedSize = Math.min(size, 100);
return storeRepository.findNearbyWithGist(
latitude, longitude, 5000.0,
latitude, longitude, 1000.0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

하드코딩된 반경 값 1000.0 대신 클래스 상수로 정의하여 관리하는 것을 권장합니다. 이를 통해 코드의 가독성을 높이고, 향후 요구사항 변경이나 성능 튜닝 시 값을 한곳에서 안전하게 변경할 수 있습니다.

추천 상수 정의 예시:

private static final double DEFAULT_NEARBY_RADIUS_METERS = 1000.0;
Suggested change
latitude, longitude, 1000.0,
latitude, longitude, DEFAULT_NEARBY_RADIUS_METERS,

@johe00123 johe00123 merged commit 1233b3d into develop Jun 2, 2026
1 check passed
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