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

Fix query over classtype tables #3128

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

lonvia
Copy link
Member

@lonvia lonvia commented Jul 31, 2023

The query tried to be clever and combine the two cases where lookup is done with a ST_Contains for large areas and a radius search for everything else. When doing this with a CASE construct, the query planner cannot make use of the index. So we now create an appropriate bounding box for the radius search and do a contains operation for all cases.

The case statement prevented the index on the classtype tables
from being used. Move the case statement inside the geometry
function instead.
@lonvia lonvia merged commit c29ffc3 into osm-search:master Jul 31, 2023
8 checks passed
@lonvia lonvia deleted the fix-classtype-lookup branch July 31, 2023 08:21
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.

1 participant