Skip to content

[#107] 카테고리 분석 기능 개선#108

Merged
earlgrey02 merged 2 commits intodevfrom
refactor/107-category-analysis-optimzation
Mar 10, 2026
Merged

[#107] 카테고리 분석 기능 개선#108
earlgrey02 merged 2 commits intodevfrom
refactor/107-category-analysis-optimzation

Conversation

@earlgrey02
Copy link
Copy Markdown
Member

@earlgrey02 earlgrey02 commented Mar 5, 2026

작업 내용

  • 카테고리 분석 기능 정확도 개선
  • 카테고리 분석에 사용되는 쿼리 성능 개선

참고

  • 48시간 넘게 활성화된 탭은 극단적인 예시지만, 통계 기능엔 정확도가 중요하다고 판단해서 기존의 48시간 범위 제한을 없앴습니다.
    • 대신 복합 인덱스(user_id, closed_at)를 추가해 처음에 사용하던 쿼리 성능을 크게 향상시켰습니다.
      물론, 어떠한 인덱스도 range scan 범위가 넓어지게 되는 중간 날짜(2024년부터 2026년에 걸쳐 history가 존재하는 경우, 2025년 6월)에는 성능이 좋지 않다는 한계가 있습니다.
  • 연간 하루 평균 20개의 방문 기록을 생성하는 테스트 데이터 기준(버퍼 풀 워밍업)
    • 3년 기간 전체 조회 평균 쿼리 실행 시간 50ms → 20ms 개선
    • 자주 사용되는 오늘 기준 조회 평균 실행 시간 134ms → 0.5ms 개선(100회 측정 평균)

관련 이슈

@earlgrey02 earlgrey02 self-assigned this Mar 5, 2026
@earlgrey02 earlgrey02 added the refactor 리팩토링 label Mar 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 5, 2026

❌ Review Failed: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-flash-latest:generateContent: [503 Service Unavailable] This model is currently experiencing high demand. Spikes in demand are usually temporary. Please try again later.

Copy link
Copy Markdown
Member

@1117mg 1117mg left a comment

Choose a reason for hiding this comment

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

LGTM

@earlgrey02 earlgrey02 requested review from 1117mg and mjk25 March 10, 2026 10:31
@earlgrey02 earlgrey02 merged commit 582aada into dev Mar 10, 2026
1 check passed
@earlgrey02 earlgrey02 deleted the refactor/107-category-analysis-optimzation branch March 10, 2026 10:31
1117mg pushed a commit that referenced this pull request Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

카테고리 분석 기능 개선

2 participants