docs: explain-matrix의 지도 블록을 keyword 검색 추가 이후 코드와 맞춘다 - #189
Merged
Conversation
dev #180(S15P11A705-301)이 지도 마커 API에 keyword 검색을 더해, findMarkers·findMarkersWithinBounds 양쪽 WHERE에 lower(p.name) like 조건이 항상 붙는다. 매트릭스가 그 이전 쿼리를 담고 있어 실제 코드와 다른 쿼리를 재고 있었다. [3] 블록을 세 갈래로 나눴다 — bbox 없음·keyword 없음 / bbox 있음·keyword 없음 / bbox 있음·keyword 있음. keyword 패턴은 서비스가 만드는 형태(%...%, 소문자화, !이스케이프)를 리터럴로 적었다. 이름 정렬은 SQL이 아니라 자바에서 하므로 (collation 의존성 회피) 계획에 정렬 노드가 없는 것이 정상임도 주석에 남겼다. BI-38은 보존 구역이라 본문 수치를 고치지 않고 「이후 코드 변경」 절을 덧붙였다. 세 갈래를 다시 재보니 접근 경로가 모두 동일해(Nested Loop + place_pkey) 판정 4의 결론은 변경 후에도 유지된다. 그에 따라 개선 후보 3의 성격도 '계획 관측 부정확'이 아니라 '응답 크기 과대 계상'으로 좁혔다. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
dev #180(S15P11A705-301)이 지도 마커 API에
keyword검색을 더한 뒤,explain-matrix.sql이 그 이전 쿼리를 담고 있어 실제 코드와 다른 쿼리를 재고 있었다. [3] 블록을 현재 코드와 동기화하고 세 갈래로 나눈다.Jira (필수)
변경 사항
loadtest/sql/explain-matrix.sql— [3] 블록을 세 갈래로 분리[3a]bbox 없음 · keyword 없음 →findMarkers(부하 시나리오가 부르는 쪽)[3b]bbox 있음(서울) · keyword 없음 → 프론트 지도 화면 기본 경로[3c]bbox 있음(서울) · keyword 있음 → 지도 검색 경로RecordService.toLikeKeyword가 만드는 형태(%…%· 소문자화 ·!이스케이프)를 리터럴로 적었다ORDER BY가 없는 것이 정상임을 주석에 남겼다 — 이름 정렬은 collation 의존성 회피를 위해 자바에서 한다(RecordService.sortByName)docs/backend/implements/BI-38-…— 보존 구역이라 본문 수치는 그대로 두고 「이후 코드 변경 (추가 기록)」 절을 덧붙였다. 개선 후보 3의 성격도 실측 결과에 맞게 좁혔다테스트 / 검증
git diff --name-only→.md·.sql만) —clean check대상 코드 무변경갱신된 매트릭스를 천만 건 볼륨에 실제로 돌려 문법과 계획을 확인했다 (종료 코드 0, member 2792 · 후보 697행):
place_pkeyplace_pkeyplace_pkey접근 경로가 세 갈래 모두 동일하다. 회원 record를
uq_record_active로 먼저 좁힌 뒤 place를 PK로 확인하며 bbox·LIKE를 필터로 적용한다. 양끝 와일드카드 LIKE가 인덱스를 쓰지 못하는 것은 사실이지만 697회 루프 안에서만 평가되므로 규모 문제가 되지 않는다 — BI-38 판정 4의 결론(표 크기에 비례하지 않고 회원 데이터에만 비례)은 변경 후에도 유지된다.([3b]·[3c]는 [3a]의 워밍 이득을 받은 같은 실행 안의 값이라 갈래 간 절대값 비교에는 쓰지 않았다. 계획 모양 확인이 목적이다.)
리뷰 포인트
docs/backend/README.md규약에 맞는지NULL IS NULL형태로 적어 null 경로를 재현한 방식 — 실제 바인딩과 계획이 같은지🤖 Generated with Claude Code