SolarArbiter / solarforecastarbiter-api

HTTP API and database schema for the Solar Forecast Arbiter
https://api.solarforecastarbiter.org
MIT License
10 stars 6 forks source link

Speed up value inserts #212

Closed alorenzo175 closed 4 years ago

alorenzo175 commented 4 years ago

It can take seconds (at least locally) to write a few thousand datapoints using one of the store_*_values procedures. This is also probably leading to a ~10 reads for every row written. Now all the values are bundled into a json array instead of going through each individual value with at least a 10x to 100x speedup.

Screenshot from 2020-02-09 21-23-25