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

Optimizing the make valid geometry query #13

Merged
merged 1 commit into from
Oct 10, 2023
Merged

Conversation

ssadhu-sl
Copy link
Contributor

Includes two points as part of this PR:

  1. The Make_valid query was updating the entire entity table when invalid geometries were encountered, Filtered this out now based on which dataset is being processed.

  2. ST_IsValid() function is failing for complex geometries. Used ST_IsSimple() to detect such geometries and then update them to valid geometries

Reference ticket: https://trello.com/c/lU5ILKCu/749-bug-fix-postgresql-cpu-issues

Copy link

@morgan-sl morgan-sl left a comment

Choose a reason for hiding this comment

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

Optimization changes have proven to make a difference.
I see no reason not to get this into PROD to help address the LIVE issue.

@ssadhu-sl ssadhu-sl merged commit 7315c25 into main Oct 10, 2023
4 checks passed
@ssadhu-sl ssadhu-sl deleted the optimize_geometry_query branch October 10, 2023 11:25
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.

3 participants