gendesign/backend/app/services
Light1YT e33273591b
Some checks failed
CI / changes (pull_request) Successful in 8s
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Successful in 2m10s
CI / backend-tests (pull_request) Failing after 14m34s
perf(objective_lots): inline DISTINCT ON for 3 view-fullscan consumers + cache landing stats (#1953)
#1964 repointed landing/supply_layers/special_indices to v_objective_lots_latest,
whose DISTINCT ON is an optimization barrier — outer WHERE can't push below it, so
the planner full Parallel-Seq-Scans 1.76M rows + external merge sorts (~6-8s) per call.

- landing._query_stats: add 1h in-process TTL cache (homepage /landing/stats was
  uncached; KPI3 full-view-aggregate measured 6.7s/load). Threadpool-aware lock,
  DB query outside lock, only successful result cached. Mirrors weather_cache.
- supply_layers._L1_OPEN_SQL: view->inline DISTINCT ON, stable filters
  (premise_kind/district) pushed below dedup -> Bitmap on district_class_idx.
  district-scoped 5.9s->0.45s (~13x).
- special_indices._ARTIFICIAL_DEMAND_SQL: view->inline 2-layer CTE; stable filters
  before dedup, changing filters (is_sold/contract_date/class) AFTER dedup.
  class has 248 transient physflats -> before-dedup drifted +193 on standard.
  district-scoped 6.7s->0.57s (~12x), EKB-wide 8.1s->5.5s.

Result bit-identical to view, verified on prod across all classes/districts.
Uses existing covering / district_class indexes (no migration).
2026-06-28 21:41:35 +05:00
..
analysis_runs fix(week-review): backend-аудит v2 — 82 фиксов (#1660) 2026-06-17 17:13:38 +00:00
analytics fix(week-review): backend-аудит v2 — 82 фиксов (#1660) 2026-06-17 17:13:38 +00:00
cadastre fix(cadastre): cad_territorial_zones MULTIPOLYGON typmod + ST_Multi coercion (#1344) 2026-06-17 20:23:56 +03:00
chat fix(admin-scrape): ge=1 on count param + enforce LLM finish_reason (#review-followup) 2026-06-17 21:23:13 +03:00
etl feat(etl): housing-class normalization fallback via yandex_realty trigram match (#38) (#1911) 2026-06-26 07:44:25 +00:00
exporters fix(forecasting): honest scenarios collapse when β rate-sensitivity gate fails (audit #1871 P1) 2026-06-22 19:06:22 +05:00
forecasting perf(objective_lots): inline DISTINCT ON for 3 view-fullscan consumers + cache landing stats (#1953) 2026-06-28 21:41:35 +05:00
generative feat(concept): house-type catalog + program-driven placement (#1965 Stage 3a) 2026-06-28 01:29:04 +05:00
llm fix(llm): word-boundary INN match, tighten edge cases (#1640 follow-up) 2026-06-17 21:24:59 +03:00
photos merge: resolve conflicts with main (#1660) into week-review-finish 2026-06-17 20:21:06 +03:00
scrapers fix(scrapers): разблокировать domrf_kn flats — изоляция flats от poison-extras + throttle (#1945) (#2050) 2026-06-28 13:03:43 +00:00
site_finder perf(objective_lots): inline DISTINCT ON for 3 view-fullscan consumers + cache landing stats (#1953) 2026-06-28 21:41:35 +05:00
__init__.py init 2026-04-25 13:45:19 +03:00
analytics_queries.py fix(analytics): recommend_mix success-boost regression from view 172 (#1955) 2026-06-27 15:49:40 +05:00
analytics_refresh.py fix(scrape): SQLAlchemy text() парсил ':00:' regex как named-param 2026-04-30 23:16:11 +03:00
forecast_request_cache.py perf(forecast): per-request memoization cache for §22 cold build (#1129) 2026-06-08 05:26:27 +00:00
insights.py feat(insights): manual-entry Insight entity CRUD + §19 audit (#948 part A) 2026-06-08 12:41:39 +05:00
job_settings.py fix(admin-jobs): UPSERT в PUT /admin/jobs/settings — не терять изменения (#1223) 2026-06-13 08:36:23 +00:00
objective_etl.py fix(week-review): backend-аудит v2 — 82 фиксов (#1660) 2026-06-17 17:13:38 +00:00
objective_sync_config.py fix(objective-sync): log seed failure вместо bare except pass (#1226) 2026-06-13 15:03:34 +05:00
own_projects.py feat(site-finder): own-portfolio data source for §25.3 cannibalization (#1169 PR1) 2026-06-08 16:21:53 +05:00
weather_cache.py fix(weather): wind_d returns None when no valid samples, not fabricated 0.0° (#weather-cache) 2026-06-17 21:22:31 +03:00