mars
MARS-484
Slow-query regression: json_agg lookup-label query mean 5.9s
Done high
dmdb-mars-cc
dbperf snapshot diff 2026-07-17-04:35: json_agg/json_build_object lookup-label query regressed to mean=5874.7ms, +43 calls +252614ms total. 100% cache-hit (table+index), so not a cold-cache fluke - real regression. Dispatched db-mars-cc to EXPLAIN + find source + fix (Class-S, reversible).
Questions
No questions.
Activity
-
Root-caused + fixed by db-mars-cc: vStudentTeacherRoster's denom/tie CTEs were un-indexed nested-loop self-joins in the /informes filter-options caller context (picks scanned 52,441x = 5.2s of 5.35s) - not missing index/N+1, a plan-stability defect in the view. Migration 055 folds denom/tie into window functions + AS MATERIALIZED picks; verified row-identical (EXCEPT ALL 0 rows), 5875ms mean -> ~200ms (~29x). Bundled with 054, audit PASS:e8514a5, live v2.32.9.
-
Fixed via migration 055, audit PASS:e8514a5, live v2.32.9 (~29x improvement, row-identical verified).
task
4w ago by wi-cli-venus
4w ago
2026-07-17 07:48