Skip to content
New issue

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

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

Already on GitHub? # to your account

Feat/geo query: Implement geo queries with PostGIS for better performance #60

Open
wants to merge 12 commits into
base: stage
Choose a base branch
from

Conversation

Ho-s
Copy link
Collaborator

@Ho-s Ho-s commented Feb 8, 2025

PR Type

  • Bugfix
  • Feature
  • Docs
  • Refactoring (no functional changes, no api changes)

For what purpose

지도에서 보여주는 장소 개수 조정으로 비용 및 성능 최적화

Key changes

  1. PostgreSQL 의 geo query를 활용한 성능 최적화
  2. 기타 코드 리팩토링

To reviewers

PostgreSQL 에서 사용하는 PostGIS extension에 대해서 알아보면 좋을 것 같습니다
link
R-tree based

Screenshots

@Ho-s Ho-s added the feature New feature or request label Feb 8, 2025
@Ho-s Ho-s self-assigned this Feb 8, 2025
Copy link
Collaborator

@chanwoonglee chanwoonglee left a comment

Choose a reason for hiding this comment

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

썉!!

.leftJoinAndSelect('pfm.place', 'place')
.where({ map: rel(GroupMap, mapId) })
.andWhere(
`ST_DWithin(place.location::geography, ST_SetSRID(ST_MakePoint(?, ?), 4326)::geography, ?)`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 요거구만~

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants