Skip to content

GET Datastream(id) slow on large database #174

@tebben

Description

@tebben

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions