gost / server

GOST - Go implementation of OGC SensorThings API
MIT License
61 stars 19 forks source link

How to increase performance query? #181

Open elma13 opened 3 years ago

elma13 commented 3 years ago

In the SamenMeten programm we use the sensorThings API to store and publish the sensor-data. I made some R-code to get data from the API (https://github.com/rivm-syso/samanapir ). I am not familiar with the expand-functionality, so I extract the data stepwise, first the thing, than de Datastream and then the Observations. This takes longer than I expect, for example this query last a couple of seconds: https://api-samenmeten.rivm.nl/v1.0/Datastreams(4769)/Observations?$filter=phenomenonTime+gt+%272020-10-10%27+and+phenomenonTime+lt+%272020-10-24%27&$orderby=phenomenonTime

Can someone help me to increase the performance? Is that something to do with the database or with the manner of questioning the API? Thanks in advance.

bertt commented 3 years ago

some pointers for debugging sql queries: https://github.com/gost/docs/blob/master/gost_debug_sql_queries.md