From b66bb712e49f5267f7981b28b9302967f7678851 Mon Sep 17 00:00:00 2001 From: Dusan Vojacek Date: Fri, 12 Jun 2026 15:14:07 +0200 Subject: [PATCH] =?UTF-8?q?HOTFIX=20dashboard:=20pv-slots-corrected=20?= =?UTF-8?q?=C4=8Dte=20delta=20profil=20z=20cache=20(R=5F=5F079=20=E2=86=92?= =?UTF-8?q?=20fn=5Fpv=5Fforecast=5Fdelta=5Fprofile=5Fcached)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Endpoint GET /sites/{id}/forecast/pv-slots-corrected (dashboard) volal těžkou fn_pv_forecast_delta_profile inline (~44 s/site na prod) — uživatel: 45 s response, telemetry endpoint vyhladověl. Kanonická plánovací řada (R__088) už cache používala, R__079 ne. Cache je pro všechny 4 lokality naplněná, čtenář po HOTFIX 2/2 nikdy nepočítá. Co-Authored-By: Claude Opus 4.8 (1M context) --- db/routines/R__079_fn_forecast_pv_slots_range_corrected.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/routines/R__079_fn_forecast_pv_slots_range_corrected.sql b/db/routines/R__079_fn_forecast_pv_slots_range_corrected.sql index db0a3c8..9fd9170 100644 --- a/db/routines/R__079_fn_forecast_pv_slots_range_corrected.sql +++ b/db/routines/R__079_fn_forecast_pv_slots_range_corrected.sql @@ -76,7 +76,9 @@ as $fn$ group by u.interval_start ), profile as ( - select ems.fn_pv_forecast_delta_profile( + -- VŽDY přes cache (inline fn_pv_forecast_delta_profile = ~44 s/site na prod; + -- dashboard endpoint pv-slots-corrected na ní visel). Refresh řídí job. + select ems.fn_pv_forecast_delta_profile_cached( p_site_id, p_delta_data_from, p_delta_data_to,