JCKalt / General-Work

Modeling database
0 stars 0 forks source link

improve efficiency of eydro: daily totals and device hist views #191

Open JCKalt opened 3 months ago

JCKalt commented 3 months ago

It is no longer a good idea to have daily_totals_view pull from the device_hist view because device_hist now joins to weather for all readings and daily_totals_view only needs one row per day which is a grouping from device_data. So we need to pull from device_data and compute the things that are needed from device_hist inside the daily totals view.