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

refactor: get map markers database query #15899

Merged
merged 1 commit into from
Feb 4, 2025
Merged

Conversation

jrasm91
Copy link
Contributor

@jrasm91 jrasm91 commented Feb 4, 2025

Push the exifInfo lat/lon is not null filter to the inner join. Also, only select the columns we need from exifInfo.

@alextran1502 alextran1502 merged commit 58bf58b into main Feb 4, 2025
38 checks passed
@alextran1502 alextran1502 deleted the refactor/get-map-markers branch February 4, 2025 15:07
Comment on lines 99 to 100
.where('exif.latitude', 'is not', null)
.where('exif.longitude', 'is not', null)
Copy link
Contributor

@mertalev mertalev Feb 4, 2025

Choose a reason for hiding this comment

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

The filter ends up being duplicated since it's in the join condition as well.

Also just FYI that where conditions and join conditions work the same for inner joins. It pre-filters either way. It's different for left joins - join conditions are better for left joins (e.g. it's better to join on a = 1 than to filter by x.a = 1 or x is null).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, woops. I meant to delete the where clauses.

alextran1502 added a commit that referenced this pull request Feb 4, 2025
alextran1502 added a commit that referenced this pull request Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants