server icon indicating copy to clipboard operation
server copied to clipboard

How to increase performance query?

Open elma13 opened this issue 4 years ago • 1 comments

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.

elma13 avatar Feb 18 '21 08:02 elma13

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

bertt avatar Feb 18 '21 08:02 bertt