openclimatefix / uk-pvnet-app

Application for running PVNet in production
MIT License
1 stars 5 forks source link

speed up gsp query #99

Closed peterdudfield closed 1 month ago

peterdudfield commented 2 months ago

Detailed Description

One of the slowest database queries is getting the latest gsp capacites. This should be really quick, as its only 318 rows of data

Screenshot 2024-07-10 at 18 28 05

We should speed this up

Context

Possible Implementation

  1. add datetime_utc to here and pass through to here, this input should be optional
  2. add datetime_utc = now-2 days in [here](https://github.com/openclimatefix/pvnet_app/blob/main/pvnet_app/app.py#L283C26-L283C51_ in the pvnet_app