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

GET Datastream(id) slow on large database #174

Open
tebben opened this issue Apr 22, 2020 · 0 comments
Open

GET Datastream(id) slow on large database #174

tebben opened this issue Apr 22, 2020 · 0 comments

Comments

@tebben
Copy link
Contributor

tebben commented Apr 22, 2020

GET v1.0/Datastreams(id) response can be slow or even return a timeout on a larger database. This problem occurs on our test server with around 25m observations.

The slow performance is caused by postgis/datastream.go GetObservedArea()

select ST_AsGeoJSON(ST_ConvexHull(ST_Collect(feature))) as geom from %s.featureofinterest where id in (select distinct featureofinterest_id from %s.observation where stream_id=%v)
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

No branches or pull requests

1 participant