gost / server

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

index on jsonb keys possible? #178

Open derkod opened 4 years ago

derkod commented 4 years ago

Our Observation-table contain some 67000000 records. Mostly they will be retrieved by using a filter on phenomenonTime. It takes up to 30 seconds to get the desired records. Is this normal? Is it possible to create an index on phenomenonTime like is done at https://stackoverflow.com/questions/18404055/index-for-finding-an-element-in-a-json-array/18405706#18405706 and do you think this will work with the GOST-server?

bertt commented 4 years ago

Hi, 30 seconds is quite slow. You can analyze the generated queries see https://github.com/gost/docs/blob/master/gost_debug_sql_queries.md